-
-
Notifications
You must be signed in to change notification settings - Fork 646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Safe navigation for function calls throws a compile error #11094
Comments
Just learned the feature was left unimplemented, see here: |
Is safe navigation for call expression going to be implemented at all? |
Maybe reopen the issue to be sort of a feature request? We have now if (obj.foo != null)
obj.foo(); |
See the explanation in the video. The main argument against |
I made HaxeFoundation/haxe-evolution#114 as a home for discussion around |
The accepted proposal for safe navigation provides for optional chaining to be used on function as well; if a function with a value of null would be called with
?.()
, it will not be called, and return null instead if a return value is expected.A cursory review of #10561 finds that this functionality was not implemented in the test cases. It may be that this was never properly implemented.
The text was updated successfully, but these errors were encountered: