-
Notifications
You must be signed in to change notification settings - Fork 55
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
Nil lifting for method calls #133
Comments
Also relates to #85, which has to do with nil-lifting generally. |
Suppose we have an object type OT that provides a method foo. Given an expression E of type OT|(), and an expression call E.foo(), there may or may not be a method value:foo that accepts an argument of type (). The fundamental problem is that there are two plausible choices for what E.foo() should do when E results in ():
Every approach has its downside:
|
Conclusion today was not to do nil-lifting for either method calls or object field access. |
This corresponds to how the spec is currently written for method calls. |
We need to make nil lifting for method calls work well with the desugaring of method calls for non-objects into functions described in #111.
The text was updated successfully, but these errors were encountered: