You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't remember why I thought that assertion was necessary. Consider unifying types of a value and a pattern:
let x = Option.Some(123) # Option[I32]
match x:
Option.Some(i): ...
Option.None: ...
Here the unifications we do:
I32 ~ _0: argument of instantiated type of Option.Some with type of 123.
_1 ~ Option[_0]: type of Option.Some(123) with type of x.
In the second step, we link _1 -> Option[_0], and prune the level of of Option[_0] to _1s level. That prune opeartion fails because _0 is linked to I32 in the previous unification step.
For now I'll comment-out the assertion.
The text was updated successfully, but these errors were encountered:
In the type checker we have this assertion when setting link of an unification variable:
fir/src/type_checker/unification.rs
Lines 165 to 168 in a5229e3
I don't remember why I thought that assertion was necessary. Consider unifying types of a value and a pattern:
Here the unifications we do:
I32 ~ _0
: argument of instantiated type ofOption.Some
with type of123
._1 ~ Option[_0]
: type ofOption.Some(123)
with type ofx
.In the second step, we link
_1 -> Option[_0]
, and prune the level of ofOption[_0]
to_1
s level. That prune opeartion fails because_0
is linked toI32
in the previous unification step.For now I'll comment-out the assertion.
The text was updated successfully, but these errors were encountered: