flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [7/7] git commit: [flex-falcon] [refs/heads/develop] - fix a few bugs in the CallNonFunctionProblem logic
Date Wed, 24 Aug 2016 05:02:38 GMT
fix a few bugs in the CallNonFunctionProblem logic


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/ced58cc2
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/ced58cc2
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/ced58cc2

Branch: refs/heads/develop
Commit: ced58cc231ea1784cefb30511609df1cbad02d91
Parents: aeabcbc
Author: Alex Harui <aharui@apache.org>
Authored: Tue Aug 23 22:01:40 2016 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Tue Aug 23 22:02:00 2016 -0700

----------------------------------------------------------------------
 .../compiler/internal/semantics/MethodBodySemanticChecker.java     | 1 +
 .../org/apache/flex/compiler/internal/tree/as/IdentifierNode.java  | 2 ++
 2 files changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/ced58cc2/compiler/src/main/java/org/apache/flex/compiler/internal/semantics/MethodBodySemanticChecker.java
----------------------------------------------------------------------
diff --git a/compiler/src/main/java/org/apache/flex/compiler/internal/semantics/MethodBodySemanticChecker.java
b/compiler/src/main/java/org/apache/flex/compiler/internal/semantics/MethodBodySemanticChecker.java
index 04eb040..43999de 100644
--- a/compiler/src/main/java/org/apache/flex/compiler/internal/semantics/MethodBodySemanticChecker.java
+++ b/compiler/src/main/java/org/apache/flex/compiler/internal/semantics/MethodBodySemanticChecker.java
@@ -855,6 +855,7 @@ public class MethodBodySemanticChecker
             VariableDefinition varDef = (VariableDefinition)def;
             IDefinition varType = varDef.resolveType(project);
             if (varType == null || // Null here means the ANY_TYPE
+                    varType.equals(project.getBuiltinType(BuiltinType.CLASS)) ||
                     varType.equals(project.getBuiltinType(BuiltinType.FUNCTION)) ||
                     varType.equals(project.getBuiltinType(BuiltinType.OBJECT)) ||
                     varType.equals(project.getBuiltinType(BuiltinType.ANY_TYPE)))

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/ced58cc2/compiler/src/main/java/org/apache/flex/compiler/internal/tree/as/IdentifierNode.java
----------------------------------------------------------------------
diff --git a/compiler/src/main/java/org/apache/flex/compiler/internal/tree/as/IdentifierNode.java
b/compiler/src/main/java/org/apache/flex/compiler/internal/tree/as/IdentifierNode.java
index da50f5d..3642c05 100644
--- a/compiler/src/main/java/org/apache/flex/compiler/internal/tree/as/IdentifierNode.java
+++ b/compiler/src/main/java/org/apache/flex/compiler/internal/tree/as/IdentifierNode.java
@@ -1036,6 +1036,8 @@ public class IdentifierNode extends ExpressionNodeBase implements IIdentifierNod
 
     public boolean isLegacyCodegen(ICompilerProject project)
     {
+        if (!(project instanceof FlexProject))
+            return false;
         final Integer compatibilityVersion = ((FlexProject)project).getCompatibilityVersion();
         if (compatibilityVersion == null)
             return false;


Mime
View raw message