Closed Pauan closed 6 years ago
I did a lot of debugging, and I found the source of this bug:
Because a variable is not a constructor, conNamess
is empty.
So when it calls visitBranches
, the cases
is empty.
This causes it to print a warning and completely discard all of the branches, so the end result is that the match
expression gets rewritten to match (1) {}
I tried to reproduce the bug in the current version of Koka, but the above example successfully evaluates to 1
.
This code:
Fails with this error: