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
Invoke Call Hierarchy (Ctrl+Alt+H) and Search for References (Ctrl+Shift+G). In the first case, both f.FGJava.foo() and f.FG.foo() are shown, in the second case only f.FGJava.foo() is shown.
Now, select f.FJ.doSomething(int, boolean) and invoke Call Hierarchy. Expand f.FJ.doSomething(int). Coherently with the second case above, only f.FGJava.foo() is shown.
In other words, references from Groovy code are not found when the invocation is made through an interface.
The text was updated successfully, but these errors were encountered:
MethodReferenceSearchRequestor is looking for f.FG.doSomething(int) or f.FJ.doSomething(int), whereas the type inferred at the call site is f.IFJ.doSomething(int). The declaring type would need to be re-written in the constructor of MethodReferenceSearchRequestor with the type that the overridden method originates from. Or MethodReferenceSearchRequestor would need to be able to search for multiple declaring types.
This was the old GRECLIPSE-1786.
Consider the following code. An interface:
A Java class implementing that interface:
A Java class using an instance of the aforementioned class, through the interface:
The same class, written in Groovy:
Now, select the following methods:
f.IFJ.doSomething(int)
f.FJ.doSomething(int)
Invoke Call Hierarchy (Ctrl+Alt+H) and Search for References (Ctrl+Shift+G). In the first case, both
f.FGJava.foo()
andf.FG.foo()
are shown, in the second case onlyf.FGJava.foo()
is shown.Now, select
f.FJ.doSomething(int, boolean)
and invoke Call Hierarchy. Expandf.FJ.doSomething(int)
. Coherently with the second case above, onlyf.FGJava.foo()
is shown.In other words, references from Groovy code are not found when the invocation is made through an interface.
The text was updated successfully, but these errors were encountered: