Community
Participate
Working Groups
Created attachment 253931 [details] test project Assume a Java file like this: public class ContribJava { public static <T extends ETypedElement> T doSomething(final T typed) { return typed; } public static <T extends EClassifier> T doSomething(final T classifier) { return classifier; } } In an Xtend class implementing the following method def void a() { ContribJava.doSomething(EcoreFactory.eINSTANCE.createEAttribute) ContribJava.doSomething(EcoreFactory.eINSTANCE.createEClass) } the second statement is flagged erroneous. Interestingly, having 'doSomething(...)' implemented in an Xtend like class ContribXtend { def static <T extends ETypedElement> T doSomething(T typed) { return typed; } def static <T extends EClassifier> T doSomething(T classifier) { return classifier; } } def void b() { ContribXtend.doSomething(EcoreFactory.eINSTANCE.createEAttribute) ContribXtend.doSomething(EcoreFactory.eINSTANCE.createEClass) } can be compiled properly (although I temporarily encountered the issue there as well while writing this report; removing all files in xtend-gen fixed it). Find a small test project attached.
Workaround: Rename T to E in one of the methods. Filtering by signature appears to be broken.
Good hint, works for me! Thank you :-)