Community
Participate
Working Groups
Build Identifier: 20100218-1602 The following two Xtend method signatures for "String abc" are (in M7) marked as duplicates but should infact be allowed: String abc(String this, int var) : 'test' ; String abc(String this, Integer var) : var.arg() ; private String arg(Integer this) : this != null ? this.toString() : 'null' ; Reproducible: Always Steps to Reproduce: 1. Create two Xtend functions as above and validate Xtend resource
int and Integer both aliases for the same type (java.lang.Long). So the signatures are effectively identical. Please reopen if I misunderstood your point.
And how about this Xtend validation: two error messages: 1: "Duplicate extension definition: abc(List[B]): List[B]" 2: "Duplicate extension definition: abc(List[C]): List[C]" for the following functions: 1: List[B] abc(List[B] this) : doSomethingForB() ; 2: List[C] abc(List[C] this) : doSomethingForC() ; while type B extends A and type C extends A. This was not marked as erroneous prior to M7.
Xtend doesn't inspect the contents of lists for polymorphic dispatch. So we basically use type erasure which makes both signatures equal.
Closing bug which were set to RESOLVED before Eclipse Neon.0.