AccessorDefinition: fix null exception in hasConflictingLanguageNSDefinition() when accessor is created by [Bindable] variable
The code assumed that getFunctionNode() would be non-null, but bindable variables won't have a function node. Switched to getNode() instead.
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/AccessorDefinition.java b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/AccessorDefinition.java
index e47d4e8..f842087 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/AccessorDefinition.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/AccessorDefinition.java
@@ -239,7 +239,7 @@
((AccessorDefinition) check).problematic = true;
//checking occurs twice, don't add multiple duplicate problems for the same check
problematic = true;
- project.getProblems().add(new DuplicateFunctionDefinitionProblem(getFunctionNode().getNameExpressionNode(), this.getBaseName()));
+ project.getProblems().add(new DuplicateFunctionDefinitionProblem(getNode().getNameExpressionNode(), this.getBaseName()));
}
return true;
}