Merge branch 'main' into i4416

Signed-off-by: Ayaz <20735482+ayazhafiz@users.noreply.github.com>
This commit is contained in:
Ayaz 2022-11-17 09:07:00 -06:00 committed by GitHub
commit a74d7e14b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 102 additions and 24 deletions

View file

@ -8236,4 +8236,26 @@ mod solve_expr {
@"Hash#Hash.hash(1) : a, I64 -[[Hash.hashI64(12)]]-> a | a has Hasher"
)
}
#[test]
fn generalize_inferred_opaque_variable_bound_to_ability_issue_4408() {
infer_eq_without_problem(
indoc!(
r#"
app "test" provides [top] to "./platform"
MDict u := (List u) | u has Eq
bot : MDict k -> MDict k
bot = \@MDict data ->
when {} is
{} -> @MDict data
top : MDict v -> MDict v
top = \x -> bot x
"#
),
"MDict v -> MDict v | v has Eq",
);
}
}