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
The following test case shows the problem (the Koloboke annotation processor incorrectly complains for SubClass when it correctly doesn't complain for Implementor).
package kolobokebug;
import com.koloboke.collect.map.LongObjMap;
import com.koloboke.compile.KolobokeMap;
public class TestCase {
public interface Iface<P1, P2> {
P2 methodWithIndependentTypeVariables(P1 p1, P2 p2);
}
@KolobokeMap
static abstract class Implementor<P2> implements LongObjMap<Object>, Iface<Integer, P2> {
@Override
public P2 methodWithIndependentTypeVariables(Integer p1, P2 p2) {
return null;
}
}
@KolobokeMap
static abstract class SubClass<V> extends Implementor<V> {
// @Override
// public V methodWithIndependentTypeVariables(Integer p1, V p2) {
// return super.methodWithIndependentTypeVariables(p1, p2);
// }
}
}
Interestingly when removing type variable P1 from the method signature, it fixes the problem, so it may be that the problem only happens with methods with a partially bound type defined type variable set.
If we uncomment the redefinition method, it also fixes the problem as then the method is defined in the @KolobokeMap annotated class not a superclass of it, but the whole point of it was to be able to implement these methods only in the super-type of the annotated type.
I used Eclipse for JEE Developers 4.6.1 (whatever it updated itself to), JBoss Maven Integration APT plugin 1.3.0.201610261805
Maven dependencies:
<dependencies>
<dependency>
<groupId>com.koloboke</groupId>
<artifactId>koloboke-compile</artifactId>
<version>0.5.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.koloboke</groupId>
<!-- `jdk6-7` instead of `jdk8` if you use Java 6 or 7 -->
<artifactId>koloboke-impl-common-jdk8</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
The following test case shows the problem (the Koloboke annotation processor incorrectly complains for SubClass when it correctly doesn't complain for Implementor).
Interestingly when removing type variable P1 from the method signature, it fixes the problem, so it may be that the problem only happens with methods with a partially bound type defined type variable set.
If we uncomment the redefinition method, it also fixes the problem as then the method is defined in the @KolobokeMap annotated class not a superclass of it, but the whole point of it was to be able to implement these methods only in the super-type of the annotated type.
I used Eclipse for JEE Developers 4.6.1 (whatever it updated itself to), JBoss Maven Integration APT plugin 1.3.0.201610261805
Maven dependencies:
.factorypath file:
.classpath file:
The text was updated successfully, but these errors were encountered: