Community
Participate
Working Groups
The missing validation to report that a type parameter is missing leads to invalid java code for the following example: Java class Test: public abstract class Test<M,T> {} Xtend class Bar : class Bar extends Test<String> {} This is valid for Xtend but produces the following invalid java code: @SuppressWarnings("all") public class Foo extends Test<String> { } The Error is placed on Test with the message: Incorrect number of arguments for type Test<M,T>; it cannot be parameterized with arguments <String>
The same happens when the TypeReference is a method's return type: --------- Xtend --------- import java.util.Map class Bug { def Map<Integer> foo() { } } ------------------------- In Xtend, this snipped doesn't cause any error, but in Java it does.
missing error when specifying type parameters for parameterless type: Example: --------- Xtend --------- def List<AbstractEntry<?>> getEntries() { } abstract class AbstractEntry { } ------------------------ There should be an error for <?> since AbstractEntry has no type parameters. Here, as in the other scenarios, the generated Java code is broken.
Still a valid bug.
see also bug# 380055
Pushed to gerrit. Also added a check for wildcards in super types.
Requested via bug 522520. -M.