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
Can you reproduce this with types other than nil? Teal does not support discriminating nil in unions, so you cannot implement nil-strictness by hand, it will need to be added to the language eventually.
Note to self: the solution to this bug is that union types need to be handled as generic types the same way as functions and records currently are — that is, the type object for the union needs to store type variables, so that resolve_decl_into_nominal can run match_typevals on it correctly — my current plan is to solve this by generalizing all generic types into a single internal $\Lambda$ type, so that we can do beta-reduction at the type level like $(Λα.t^α)(T) \rightarrow t[α := T]$.
Results in
x
being inferred asnil
, anderr
being inferred asnilable<string>
. I am using thenext
branch.The text was updated successfully, but these errors were encountered: