-
-
Notifications
You must be signed in to change notification settings - Fork 351
Open
Description
module []
TypeAB x : [A, B]x
TypeCD x : TypeAB [C, D]x
TypeEF x : TypeCD [E, F]x
Combined : TypeCD (TypeAB (TypeEF []))
combined_to_int : Combined -> U8
combined_to_int = |test1|
when test1 is
A -> 1
B -> 2
C -> 3
D -> 4
E -> 5
F -> 6
_ -> crash("combined_to_int() failed")
expect
value = E
int_value = combined_to_int(E)
int_value == 5$ roc test
An internal compiler expectation was broken.
This is definitely a compiler bug.
Please file an issue here: <https://github.com/roc-lang/roc/issues/new/choose>
not a tag union: Alias(`Ast.IdentId(34)`, [3395], <3396>['A' , 'A' , 'B' , 'B' , 'C' , 'D' , 'E' , 'F' , ]<Openness(3)>)
Location: crates/compiler/solve/src/solve.rs:1840:34
Zulip discussion:
#bugs > Compiler crash from pattern matching on nested extended tags @ 💬
Metadata
Metadata
Assignees
Labels
No labels