Description
Two paths in TraitReceiverTransformer.transform create PropertyExpression nodes to stand in for unresolved variable references. Neither case sets the exp source position onto the new node. Other paths through this method transfer position info.
The fix is simple:
} else if (accessedVariable instanceof PropertyNode) { String propName = accessedVariable.getName(); if (knownFields.contains(propName)) { return createFieldHelperCall(exp, weavedType, propName); } else { // GRECLIPSE edit PropertyExpression pe = /*return*/ new PropertyExpression( new VariableExpression(weaved), accessedVariable.getName() ); pe.getProperty().setSourcePosition(exp); return pe; // GRECLIPSE end } } else if (accessedVariable instanceof DynamicVariable) { // GRECLIPSE edit PropertyExpression pe = /*return*/ new PropertyExpression( new VariableExpression(weaved), accessedVariable.getName() ); pe.getProperty().setSourcePosition(exp); return pe; // GRECLIPSE end }
Attachments
Issue Links
- links to