diff options
author | acolyer <acolyer> | 2004-01-13 17:04:31 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2004-01-13 17:04:31 +0000 |
commit | b8d42c06d69f44e8c87a9b7d3ea290de0d18ed37 (patch) | |
tree | 2644257d1fac639585398ed3c9f356490f642181 /org.aspectj.ajdt.core | |
parent | 87db1e79f6b882af30d382233589ebb1fc732be9 (diff) | |
download | aspectj-b8d42c06d69f44e8c87a9b7d3ea290de0d18ed37.tar.gz aspectj-b8d42c06d69f44e8c87a9b7d3ea290de0d18ed37.zip |
Fix for Bugzilla Bug 49784
declaring interface methods should work as it does in interface
and Bugzilla Bug 45676
AspectJ enhanced code can not be used with plain old java anymo
and Bugzilla Bug 43972
Static crosscutting makes interfaces unusable for javac
Diffstat (limited to 'org.aspectj.ajdt.core')
2 files changed, 12 insertions, 0 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeMethodDeclaration.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeMethodDeclaration.java index 404d74373..3babcfbf0 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeMethodDeclaration.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/InterTypeMethodDeclaration.java @@ -72,6 +72,16 @@ public class InterTypeMethodDeclaration extends InterTypeDeclaration { super.resolve(upperScope); } public void resolveStatements() { + if ((modifiers & AccSemicolonBody) != 0) { + if ((declaredModifiers & AccAbstract) == 0) + scope.problemReporter().methodNeedingAbstractModifier(this); + } else { + // the method HAS a body --> abstract native modifiers are forbiden + if (((declaredModifiers & AccAbstract) != 0)) + scope.problemReporter().methodNeedingNoBody(this); + } + + if (!Modifier.isAbstract(declaredModifiers)) super.resolveStatements(); if (Modifier.isStatic(declaredModifiers)) { // Check the target for ITD is not an interface diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java index 1cc603f0b..b3af379ee 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java @@ -308,6 +308,8 @@ public class AjLookupEnvironment extends LookupEnvironment { } } + //???onType.checkInterTypeMungers(); + onType.checkInterTypeMungers(); for (Iterator i = onType.getInterTypeMungers().iterator(); i.hasNext();) { EclipseTypeMunger munger = (EclipseTypeMunger) i.next(); //System.out.println("applying: " + munger + " to " + new String(sourceType.sourceName)); |