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
In which case it will cause the following compiler panic:
thread 'main' panicked at 'internal error: entered unreachable code: Tried to apply an unbound type variable (id 259), args: [TypeApplication(UserDefined(TypeInfoId(10)), [TypeApplication(Primitive(IntegerType), [Primitive(IntegerTag(U8))]), TypeApplication(Primitive(IntegerType), [Primitive(IntegerTag(U16))])])]', src/hir/monomorphisation.rs:550:25
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
The text was updated successfully, but these errors were encountered:
jfecher
changed the title
Adding type annotations to a ref can crash the compiler
Adding type annotations to an unbound type variable can crash the compiler
Oct 19, 2023
The issue here seems to stem from the typo of ref instead of Ref:
map: Ref (HashMap U8 U16) = mut empty ()
a type annotation of a type application to an unbound type variable is rather unusual. Perhaps this issue will be fixed once we check type annotations must match exactly their target types rather than the current behavior where type variables in the annotation may still be bound to more specific types.
Will run fine, until adding a type annotation:
In which case it will cause the following compiler panic:
The text was updated successfully, but these errors were encountered: