Make sure to register imported variables when importing specializations

Closes #4671
This commit is contained in:
Ayaz Hafiz 2022-12-05 11:44:28 -06:00
parent 306f3bee78
commit 09353733fa
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 145 additions and 53 deletions

View file

@ -8431,4 +8431,29 @@ mod solve_expr {
@"n : Dec"
);
}
#[test]
fn resolve_set_eq_issue_4671() {
infer_queries!(
indoc!(
r#"
app "test" provides [main] to "./platform"
main =
s1 : Set U8
s1 = Set.empty
s2 : Set Str
s2 = Set.empty
Bool.isEq s1 s1 && Bool.isEq s2 s2
# ^^^^^^^^^ ^^^^^^^^^
"#
),
@r###"
Set#Bool.isEq(17) : Set U8, Set U8 -[[Set.isEq(17)]]-> Bool
Set#Bool.isEq(17) : Set Str, Set Str -[[Set.isEq(17)]]-> Bool
"###
);
}
}