diff options
3 files changed, 6 insertions, 3 deletions
diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/compiler/ast/InterTypeConstructorDeclaration.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/compiler/ast/InterTypeConstructorDeclaration.java index 5a2038f75..16182762c 100644 --- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/compiler/ast/InterTypeConstructorDeclaration.java +++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/compiler/ast/InterTypeConstructorDeclaration.java @@ -192,7 +192,8 @@ public class InterTypeConstructorDeclaration extends InterTypeDeclaration { } InterTypeScope newParent = new InterTypeScope(scope, onTypeBinding); - pre.scope.parent = newParent; + // Use setter in order to also update member 'compilationUnitScope' + pre.scope.setParent(newParent); pre.resolveStatements(); // newParent); diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/compiler/ast/InterTypeDeclaration.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/compiler/ast/InterTypeDeclaration.java index ff765515a..75e0a20e3 100644 --- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/compiler/ast/InterTypeDeclaration.java +++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/compiler/ast/InterTypeDeclaration.java @@ -146,7 +146,8 @@ public abstract class InterTypeDeclaration extends AjMethodDeclaration { if (!scopeSetup) { interTypeScope = new InterTypeScope(upperScope, onTypeBinding,typeVariableAliases); - scope.parent = interTypeScope; + // Use setter in order to also update member 'compilationUnitScope' + scope.setParent(interTypeScope); this.scope.isStatic = Modifier.isStatic(declaredModifiers); scopeSetup = true; } diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/compiler/ast/IntertypeMemberClassDeclaration.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/compiler/ast/IntertypeMemberClassDeclaration.java index fe95dd53e..9fa9456aa 100644 --- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/compiler/ast/IntertypeMemberClassDeclaration.java +++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/compiler/ast/IntertypeMemberClassDeclaration.java @@ -203,7 +203,8 @@ public class IntertypeMemberClassDeclaration extends TypeDeclaration { // this is the original version in case tricking the JDT causes grief (if you reinstate this variant, you // will need to change the expected messages output for some of the generic ITD tests) // scope.isStatic = Modifier.isStatic(declaredModifiers); - scope.parent = interTypeScope; + // Use setter in order to also update member 'compilationUnitScope' + scope.setParent(interTypeScope); } scopeSetup = true; } |