This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit 350bfa21f18aaeffaa25d789cfccf6ee355bec9c
Author: Alex Harui <aha...@apache.org>
AuthorDate: Mon Nov 5 15:59:41 2018 -0800

    catch calls to accessors
---
 .../royale/compiler/internal/as/codegen/ABCGeneratingReducer.java    | 5 +++++
 1 file changed, 5 insertions(+)

diff --git 
a/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/ABCGeneratingReducer.java
 
b/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/ABCGeneratingReducer.java
index 4204a9b..5dfb649 100644
--- 
a/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/ABCGeneratingReducer.java
+++ 
b/compiler/src/main/java/org/apache/royale/compiler/internal/as/codegen/ABCGeneratingReducer.java
@@ -55,6 +55,7 @@ import 
org.apache.royale.compiler.internal.tree.as.BaseVariableNode;
 import org.apache.royale.compiler.internal.tree.as.VariableExpressionNode;
 import org.apache.royale.compiler.problems.AmbiguousGotoTargetProblem;
 import 
org.apache.royale.compiler.problems.AnyNamespaceCannotBeQualifierProblem;
+import org.apache.royale.compiler.problems.CallNonFunctionProblem;
 import org.apache.royale.compiler.problems.CodegenInternalProblem;
 import org.apache.royale.compiler.problems.DuplicateLabelProblem;
 import org.apache.royale.compiler.problems.DuplicateNamespaceDefinitionProblem;
@@ -3999,6 +4000,8 @@ public class ABCGeneratingReducer
     public InstructionList 
reduce_functionCallOfSuperclassMethod_to_expression(IASNode iNode, 
InstructionList stem, Binding method_name, Vector<InstructionList> args)
     {
         currentScope.getMethodBodySemanticChecker().checkSuperAccess(iNode);
+        if (method_name.getDefinition() instanceof AccessorDefinition)
+               getProblems().add(new CallNonFunctionProblem(iNode, 
method_name.getName().getBaseName()));
 
         InstructionList result = createInstructionList(iNode);
 
@@ -4017,6 +4020,8 @@ public class ABCGeneratingReducer
     public InstructionList 
reduce_functionCallOfSuperclassMethod_to_void_expression(IASNode iNode, 
InstructionList stem, Binding method_name, Vector<InstructionList> args)
     {
         currentScope.getMethodBodySemanticChecker().checkSuperAccess(iNode);
+        if (method_name.getDefinition() instanceof AccessorDefinition)
+               getProblems().add(new CallNonFunctionProblem(iNode, 
method_name.getName().getBaseName()));
 
         InstructionList result = createInstructionList(iNode);
 

Reply via email to