Change calls like
pre.scope.parent = newParent;
to this pattern:
// Use setter in order to also update member 'compilationUnitScope'
pre.scope.setParent(newParent);
This should fix lots of failing tests after updating JDT Core.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
}
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);
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;
}
// 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;
}