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
Your use of MyInterface is a raw type. So override method lookup is checking for a doSomething(I) but the raw type has doSomething(Object). Is your intent to supply java.lang.Object for the type parameters I and O?
I know I'm using it as a raw type, however in Groovy this is not so unusual. Yes, I would expect to see Object for I and O, I don't think Greclipse could be smarter than this, unless I use:
MyInterface<String, Integer> i =newMyInterface() { ... }
In this case, indeed, Greclipse may infer that I and O should rather be String and Integer respectively, rather than Object, just like the Diamond operator MyInterface<> in Java 7+.
I'm just checking that you mean Object. It was unclear to me if you meant to leave off the type parameters or if you planned to fill them in after implementing methods. It can be hard to tell with editor stuff where the author is going with edits; whereas with compiler bugs, the full source is at hand.
Consider this:
And the following Groovy class:
Invoke code assist at "|" and choose to Override method
doSomething
inMyInterface
. The expected result is:The actual result is:
The text was updated successfully, but these errors were encountered: