Lines 895-901
Link Here
|
895 |
// in >= 1.5 mode, ensure the exactMatch did not match raw types |
895 |
// in >= 1.5 mode, ensure the exactMatch did not match raw types |
896 |
if (compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) |
896 |
if (compilerOptions().sourceLevel >= ClassFileConstants.JDK1_5) |
897 |
for (int i = argumentTypes.length; --i >= 0;) |
897 |
for (int i = argumentTypes.length; --i >= 0;) |
898 |
if (isSubtypeOfRawType(argumentTypes[i])) |
898 |
if (isPossibleSubtypeOfRawType(argumentTypes[i])) |
899 |
return null; |
899 |
return null; |
900 |
// must find both methods for this case: <S extends A> void foo() {} and <N extends B> N foo() { return null; } |
900 |
// must find both methods for this case: <S extends A> void foo() {} and <N extends B> N foo() { return null; } |
901 |
// or find an inherited method when the exact match is to a bridge method |
901 |
// or find an inherited method when the exact match is to a bridge method |
Lines 2995-3001
Link Here
|
2995 |
return false; |
2995 |
return false; |
2996 |
} |
2996 |
} |
2997 |
|
2997 |
|
2998 |
public boolean isSubtypeOfRawType(TypeBinding paramType) { |
2998 |
public boolean isPossibleSubtypeOfRawType(TypeBinding paramType) { |
2999 |
TypeBinding t = paramType.leafComponentType(); |
2999 |
TypeBinding t = paramType.leafComponentType(); |
3000 |
if (t.isBaseType()) return false; |
3000 |
if (t.isBaseType()) return false; |
3001 |
|
3001 |
|
Lines 3004-3009
Link Here
|
3004 |
int nextPosition = 0; |
3004 |
int nextPosition = 0; |
3005 |
do { |
3005 |
do { |
3006 |
if (currentType.isRawType()) return true; |
3006 |
if (currentType.isRawType()) return true; |
|
|
3007 |
if (!currentType.isHierarchyConnected()) return true; // do not fault in super types right now, so assume one is a raw type |
3007 |
|
3008 |
|
3008 |
ReferenceBinding[] itsInterfaces = currentType.superInterfaces(); |
3009 |
ReferenceBinding[] itsInterfaces = currentType.superInterfaces(); |
3009 |
if (itsInterfaces != null && itsInterfaces != Binding.NO_SUPERINTERFACES) { |
3010 |
if (itsInterfaces != null && itsInterfaces != Binding.NO_SUPERINTERFACES) { |