intellij-haxe
intellij-haxe copied to clipboard
Haxe 4: Parse 'case var' syntax change
'var' is now allowed between case and variable name to differentiate short capture variables in switch blocks.
See github.com/HaxeFoundation/haxe/issues/6207.
Also consider adding checks for this to semantic analysis.
Note: This was partially allowed in Haxe 3 as well. It was supposed to work in all patterns, but didn't correctly parse at toplevel-patterns. However, this should have worked in Haxe 3: case Some(var x):
Thanks, Simon. I didn't check to see if the functionality was already there. I just wanted to get a reminder in place, given that there's been action on it.