HaxeFoundation / HaxeFoundation/haxe
constant expressions not allowed in switch cases
Open
feature-pattern-matching
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
Constant expressions don't appear to be allowed as valid switch cases.
```haxe
class Test {
static function main() {
var i=5;
switch(i) {
case (1+5): return;
}
}
}
```
Build failure
Test.hx:5: characters 21-26 : Unrecognized pattern: (1 + 5)
Contributor guide
Assessment
This issue has not been assessed yet.