intellij-haxe icon indicating copy to clipboard operation
intellij-haxe copied to clipboard

Haxe 4: Parse 'case var' syntax change

Open EricBishton opened this issue 8 years ago • 2 comments

'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.

EricBishton avatar Sep 22 '17 22:09 EricBishton

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):

Simn avatar Sep 27 '17 15:09 Simn

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.

EricBishton avatar Sep 27 '17 21:09 EricBishton