-
Notifications
You must be signed in to change notification settings - Fork 163
Add tests for type hierarchy with subtype in lambda #4710
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
base: master
Are you sure you want to change the base?
Conversation
|
The working copy test fails with: |
|
I've adjusted the new tests to also run into the problem seen in #4704. The two fails are now: (#4704) (#4707) |
82665bb to
07ddcac
Compare
|
When I check how the other types in the computed hierarchy are found in For The cache has a corresponding Both have For the anonymous type in the lambda, the hierarchy als contains a
This leads to calling
The The The Note that I also see this From what I can tell, the (expected) This The unexpected In
But at |
|
This highlights the difference and why we don't find the anonymous type in the types created on Output: Note that if I traverse |
|
@stephan-herrmann could you give your opinion here? I have those two classes: What do you think should be the parent of the anonymous type in
If I would replace the lambda declaration with an anonymous subtype of But with the lambda I don't know. And without knowing, I'm not sure in which code I should be analyzing the problem further. |
With "parent" you mean the enclosing IJavaElement? (I'm asking because in the context of type hierarchies the term "parent" could mean "super type"). I vaguely recall that integrating Some quick ideas from afar:
|
The object returned by
Not that I see, actually the
No, I don't see any on the stack trace. Unless I missed anything; but I think everything is computed on-the-fly. Especially with the code in the new tests.
What the hierarchy code has as parents of the local type is: The lambda itself is also a parent here. Neither the lambda nor Alright, I'll keep looking at this code then: I think |
|
Hi @srikanth-sankaran , could you take a look here? If you check this PR out and run It looks like the the anonymous type in Only this is on the stack: Shouldn't there be more? Likewise values are on stack when retrieving the element info of the anonymous type: Best regards, |
|
Hi @trancexpress I will study this but it will take some time to wrap up the things I am working on. In the meanwhile CCing @jarthana who is our model expert. |
|
Thank you! I don't think we are in a rush here. |
See: #4707