You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi - first of all - thanks for this great plugin! While writing some externs I discovered that the plugin doesn't support a function type as return type. I created a valid code example on https://try.haxe.org/#e1A50 which I paste here:
class Test {
static function main() {
// a is fine
var a : Any -> Any -> Any =
function ( any : Any, any2 : Any ) : Any {
trace( "a()" );
return any;
};
// b is fine as well
var b : (Void -> Void) -> Void =
function ( func : Void -> Void ) : Void {
trace( "b()" );
};
// c isn't:
var c : Void -> (Void -> Void) =
function () : Void -> Void {
trace( "c()" );
return function() : Void {
trace( "d()" );
}
};
a( "any", "any");
b( function() { trace( "b(())" ); } );
var d = c();
d();
}
}
And here a little shot of the error displayed in IntelliJ IDEA:
Looks not that bad in this code example, but on a different setup it avoids autocompletion, imports validation and stuff like that:
The text was updated successfully, but these errors were encountered:
Same base issue as #293 and #575: The parser has trouble with nested function type arguments.
We may be able to keep the parser from giving up when the type isn't parsed correctly (using better recovery rules?). Fixing the nested function types would be better, but it's probably going to take a week's worth of work. (Which is why it's still an outstanding issue after two people have already taken a crack at it.)
See #294 for Boyan's first attempt at fixing it. See grammar/haxe.bnf for a commented correct set of parsing rules. The real work is in the Psi and Models.
Hi - first of all - thanks for this great plugin! While writing some externs I discovered that the plugin doesn't support a function type as return type. I created a valid code example on https://try.haxe.org/#e1A50 which I paste here:
And here a little shot of the error displayed in IntelliJ IDEA:
Looks not that bad in this code example, but on a different setup it avoids autocompletion, imports validation and stuff like that:
The text was updated successfully, but these errors were encountered: