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:
parent
f10cf73905
commit
8f31b45e36
|
@ -939,7 +939,7 @@ impl<'a, 'b> ExprTyper<'a, 'b> {
|
||||||
ann_typ.clone(),
|
ann_typ.clone(),
|
||||||
value_typ.clone(),
|
value_typ.clone(),
|
||||||
typed_value.type_defining_location(),
|
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();
|
value_typ = ann_typ.clone();
|
||||||
|
|
Loading…
Reference in New Issue