Closed athas closed 9 months ago
Incredibly we didn't notice until now.
-- == -- entry: test_sum -- script input { mk_sum 1i32 } -- output { false } type sum = #none | #color i32 entry mk_sum (x: i32) : sum = #color x entry test_sum (s: sum) = s != #none
It is internalisation that messes it up and compares even values from the unused constructors.
Of course, a reasonable question could be if we should just ban equality on sum types in the type checker.
Incredibly we didn't notice until now.
It is internalisation that messes it up and compares even values from the unused constructors.