arguments[i] = fromBinding(ptb.arguments[i]);
}
}
- ResolvedType baseType = UnresolvedType.forName(getName(binding)).resolve(getWorld());
+
+ String baseTypeSignature = null;
+
+ ResolvedType baseType = getWorld().resolve(UnresolvedType.forName(getName(binding)),true);
+ if (baseType != ResolvedType.MISSING) {
+ // can legitimately be missing if a bound refers to a type we haven't added to the world yet...
+ if (!baseType.isGenericType() && arguments!=null) baseType = baseType.getGenericType();
+ baseTypeSignature = baseType.getErasureSignature();
+ } else {
+ baseTypeSignature = UnresolvedType.forName(getName(binding)).getSignature();
+ }
// Create an unresolved parameterized type. We can't create a resolved one as the
// act of resolution here may cause recursion problems since the parameters may
// be type variables that we haven't fixed up yet.
- if (!baseType.isGenericType() && arguments!=null) baseType = baseType.getGenericType();
if (arguments==null) arguments=new UnresolvedType[0];
String parameterizedSig = ResolvedType.PARAMETERIZED_TYPE_IDENTIFIER+CharOperation.charToString(binding.genericTypeSignature()).substring(1);
- return TypeFactory.createUnresolvedParameterizedType(parameterizedSig,baseType.getErasureSignature(),arguments);
+ return TypeFactory.createUnresolvedParameterizedType(parameterizedSig,baseTypeSignature,arguments);
}
// Convert the source type binding for a generic type into a generic UnresolvedType
--- /dev/null
+public abstract class ASequence <V, T extends ICounter<V> >
+ implements ISequence<V> {
+
+}
+
+aspect EnsureTypesUnpackedInWeaver {
+
+ before() : staticinitialization(*) && !within(EnsureTypesUnpackedInWeaver) {
+ System.out.println("hi");
+ }
+
+}
\ No newline at end of file
--- /dev/null
+public interface ICounter<T> {
+
+}
\ No newline at end of file
--- /dev/null
+public interface ISequence<V> {
+
+}
\ No newline at end of file
--- /dev/null
+interface ISequence<V> {
+
+}
+
+interface ICounter<T> {
+
+}
+
+abstract class ASequence <V, T extends ICounter<V> >
+ implements ISequence<V> {
+
+}
\ No newline at end of file
public void testFieldAccessInsideITDM() {
runTest("itd field access inside itd method");
}
+
+ public void testTypeVarWithTypeVarBound() {
+ runTest("type variable with type variable bound");
+ }
// helper methods.....
<compile files="pr108377.aj"/>
<run class="pr108377"/>
</ajc-test>
-
+
+ <ajc-test dir="bugs150/pr108054" pr="108054" title="type variable with type variable bound">
+ <compile files="pr108054.aj" options="-1.5"/>
+ <compile files="ISequence.java,ICounter.java,ASequence.java" options="-1.5"/>
+ </ajc-test>
+
<!-- ============================================================================ -->
<!-- ============================================================================ -->