Open arseniiv opened 6 years ago
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".
ceylon.language::Exception "Supposedly exhaustive switch was not exhaustive"
Confirmed. Thanks for reporting.
Running the code
for JS backend (see https://try.ceylon-lang.org/?gist=c7c1a51ea100cc6a16c8de3aa34971cb) prints “error”.
Alternative example:
gives runtime error
ceylon.language::Exception "Supposedly exhaustive switch was not exhaustive"
.