Community
Participate
Working Groups
This was observed when simplifying OTTypeHierarchyes.ConnectedPhantomType and has been reconstructed as test236_constructorWithBasecall7(): when leveraging bug 323862 in a situation where an argument to the base constructor requires lowering, the following NPE would occur: Caused by: java.lang.NullPointerException at org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.isCompatibleWith(ReferenceBinding.java:1322) at org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.isCompatibleWith(ReferenceBinding.java:1308) at org.eclipse.objectteams.otdt.internal.core.compiler.statemachine.transformer.InsertTypeAdjustmentsVisitor.maybeWrap(InsertTypeAdjustmentsVisitor.java:279) at org.eclipse.objectteams.otdt.internal.core.compiler.statemachine.transformer.InsertTypeAdjustmentsVisitor.endVisit(InsertTypeAdjustmentsVisitor.java:76) at org.eclipse.jdt.internal.compiler.ast.Assignment.traverse(Assignment.java:273) at org.eclipse.objectteams.otdt.internal.core.compiler.ast.BaseAllocationExpression.traverse(BaseAllocationExpression.java:333) at org.eclipse.jdt.internal.compiler.ast.ExplicitConstructorCall.traverse(ExplicitConstructorCall.java:829) at org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration.resolveStatements(ConstructorDeclaration.java:793) ...
Created attachment 179486 [details] fix The lowering request triggered the InsertTypeAdjustmentsVisitor, which traversed the BaseAllocationExpression as an Assignment, but the lhs has not been developed (i.e., resolved), because the node actually is not a statement but an expression, thus the NPE. Fixed by one more check for isExpression.
Patch has been committed as r835.
Verified using I201009231632