-
Notifications
You must be signed in to change notification settings - Fork 360
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
Dataflow: unexpected receiver type in MethodAccessNode in a subclass #5174
Comments
Actually, changing the method access above to use an explicit
Since semantically it's the same thing, I believe the type of the receiver should reflect the actual type of the accessed object. |
Does the new method (It's not the right thing to change the receiver's type, but I agree that it is useful to know the class that defines the method!) |
Thanks for your response @mernst! #5184 doesn't quite solve the problem. I can already get this info from
Which gives the class that defined the method. The problem is that when I'm not sure whether this is by design, but my expectation was that the type of the receiver should reflect the actual type of the object: in the example above I'd expect the type of an implicit this receiver to be the actual subclass' type Does this make sense? |
@artempyanykh The current state of branch |
@artempyanykh Did you have a chance to experiment with branch |
Hi @mernst. Sorry, I was sick and slow to respond. I played with
|
Snippet:
When superclass's method is invoked in a subclass, the receiver of the method points to superclass' type rather than subclass':
actual:
expected:
This is problematic because I can't use receiver's type to determine if I need to substitute type params in method's type for the subclass.
The same is true for FieldAccessNode.
The text was updated successfully, but these errors were encountered: