Hej,
I continue flooding the forum with experiments… While everithing is an expression in Haxe, why this example doesn’t work please ? Try Haxe !
class Test { static function main() { if( { 1; } != null ) trace( "ok" ); // <--- Doesn't work if( ({ 1; }) != null ) trace( "ok" ); // <--- Do work } }
Looks like an oversight in the Haxe parser. You can submit an issue.
Closed as fast as written https://github.com/HaxeFoundation/haxe/issues/10588 I even don’t rellay understand the explanation because I thought ECall was different from EParenthesis… Anyway, for my needs, I add parenthesis in expr iterations …
© 2018-2020 Haxe Foundation - Powered by Discourse