Appropriately substitute symbols in switch conditions

Closes #4557
This commit is contained in:
Ayaz Hafiz 2022-12-27 12:28:04 -06:00
parent 4dbe90db93
commit 23fc7f1413
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
3 changed files with 81 additions and 3 deletions

View file

@ -2242,3 +2242,17 @@ fn lambda_set_with_imported_toplevels_issue_4733() {
"###
)
}
#[mono_test]
fn issue_4557() {
indoc!(
r###"
app "test" provides [main] to "./platform"
isEqQ = \q1, q2 -> when T q1 q2 is
T (U f1) (U f2) -> Bool.or (isEqQ (U f2) (U f1)) (f1 {} == f2 {})
main = isEqQ (U \{} -> "a") (U \{} -> "a")
"###
)
}