Fix allow_casting condition in unification

We should allow casting from any type to any type. Or at the very least, allow it for well-known types like List.
This commit is contained in:
KtorZ 2024-03-13 13:25:30 +01:00 committed by rvcas
parent f10cf73905
commit 8f31b45e36
No known key found for this signature in database
GPG Key ID: C09B64E263F7D68C
1 changed files with 1 additions and 1 deletions

View File

@ -939,7 +939,7 @@ impl<'a, 'b> ExprTyper<'a, 'b> {
ann_typ.clone(),
value_typ.clone(),
typed_value.type_defining_location(),
(kind.is_let() && ann_typ.is_data()) || (kind.is_expect() && value_is_data),
(kind.is_let() && ann_typ.is_data()) || kind.is_expect(),
)?;
value_typ = ann_typ.clone();