diff options
author | aclement <aclement> | 2007-02-20 16:09:23 +0000 |
---|---|---|
committer | aclement <aclement> | 2007-02-20 16:09:23 +0000 |
commit | b39189a3136651450226b37a0f29fa1260837d7f (patch) | |
tree | d14961b42d2f68f13a1c8a8a8fe7b79dd03e15cc /org.aspectj.ajdt.core | |
parent | 1aef8a8cf7dfbaa164a464ee5b10e7688b6a0964 (diff) | |
download | aspectj-b39189a3136651450226b37a0f29fa1260837d7f.tar.gz aspectj-b39189a3136651450226b37a0f29fa1260837d7f.zip |
171953#1 - test and fix for generic method introduction and compilation errors varying depending on order of source file processing
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java index 0d1bb1baf..a856e5ec8 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseFactory.java @@ -567,7 +567,7 @@ public class EclipseFactory { TypeBinding ret = null; // looking up type variables can get us into trouble - if (!typeX.isTypeVariableReference()) { + if (!typeX.isTypeVariableReference() && !isParameterizedWithTypeVariables(typeX)) { if (typeX.isRawType()) { ret = (TypeBinding)rawTypeXToBinding.get(typeX); } else { @@ -592,6 +592,19 @@ public class EclipseFactory { } return ret; } + + // return true if this is type variables are in the type arguments + private boolean isParameterizedWithTypeVariables(UnresolvedType typeX) { + if (!typeX.isParameterizedType()) return false; + UnresolvedType[] typeArguments = typeX.getTypeParameters(); + if (typeArguments!=null) { + for (int i = 0; i < typeArguments.length; i++) { + if (typeArguments[i].isTypeVariableReference()) return true; + } + } + return false; + } + // When converting a parameterized type from our world to the eclipse world, these get set so that // resolution of the type parameters may known in what context it is occurring (pr114744) private ReferenceBinding baseTypeForParameterizedType; |