diff options
author | jhugunin <jhugunin> | 2003-03-11 21:04:59 +0000 |
---|---|---|
committer | jhugunin <jhugunin> | 2003-03-11 21:04:59 +0000 |
commit | d6b8b38cd0a707741788f8d4fae3850b213f50a4 (patch) | |
tree | 89d0af7f7012388a9b58aac2f1e0b5ce0b3e716d /org.aspectj.ajdt.core | |
parent | bb66774ab4a5afb36d36bc8274ff265f10d666db (diff) | |
download | aspectj-d6b8b38cd0a707741788f8d4fae3850b213f50a4.tar.gz aspectj-d6b8b38cd0a707741788f8d4fae3850b213f50a4.zip |
added tests and fixes
fixed two bugs in ajcTestsFailing
Diffstat (limited to 'org.aspectj.ajdt.core')
2 files changed, 12 insertions, 1 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeFieldDeclaration.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeFieldDeclaration.java index 583edca78..ef833b13e 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeFieldDeclaration.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeFieldDeclaration.java @@ -67,6 +67,14 @@ public class InterTypeFieldDeclaration extends InterTypeDeclaration { EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(upperScope); ResolvedMember sig = munger.getSignature(); TypeX aspectType = EclipseFactory.fromBinding(upperScope.referenceContext.binding); + + if (sig.getReturnType() == ResolvedTypeX.VOID || + (sig.getReturnType().isArray() && (sig.getReturnType().getComponentType() == ResolvedTypeX.VOID))) + { + upperScope.problemReporter().signalError(sourceStart, sourceEnd, + "field type can not be void"); + } + // // System.err.println("sig: " + sig); // System.err.println("field: " + world.makeFieldBinding( @@ -129,6 +137,8 @@ public class InterTypeFieldDeclaration extends InterTypeDeclaration { EclipseFactory world = EclipseFactory.fromScopeLookupEnvironment(classScope); resolveOnType(classScope); + if (classScope.referenceContext.binding == null) return null; + binding = classScope.referenceContext.binding.resolveTypesFor(binding); if (ignoreFurtherInvestigation) return null; 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 d1744dafb..68c875bfc 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 @@ -108,13 +108,14 @@ public class EclipseFactory { if (binding instanceof HelperInterfaceBinding) { return ((HelperInterfaceBinding) binding).getTypeX(); } - if (binding.qualifiedSourceName() == null) { + if (binding == null || binding.qualifiedSourceName() == null) { return ResolvedTypeX.MISSING; } return TypeX.forName(getName(binding)); } public static TypeX[] fromBindings(TypeBinding[] bindings) { + if (bindings == null) return TypeX.NONE; int len = bindings.length; TypeX[] ret = new TypeX[len]; for (int i=0; i<len; i++) { |