JS-related switch pattern error
Opened this issue · 1 comments
arseniiv commented
Running the code
switch ([1, 2, 3])
case ([Object head, Object* args]) {
printAll { head, args };
}
else { print("error"); }
for JS backend (see https://try.ceylon-lang.org/?gist=c7c1a51ea100cc6a16c8de3aa34971cb) prints “error”.
Alternative example:
switch ([1, 2, 3] of [Object,Object*])
case ([Object head, Object* args]) {
printAll { head, args };
}
gives runtime error ceylon.language::Exception "Supposedly exhaustive switch was not exhaustive"
.
gavinking commented
Confirmed. Thanks for reporting.