flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [4/8] git commit: [flex-falcon] [refs/heads/dual] - handle other scopes in ambiguous definitions
Date Tue, 31 Jan 2017 17:08:41 GMT
handle other scopes in ambiguous definitions


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

Branch: refs/heads/dual
Commit: 55ee96879f92c27598ef74a6a329d7af8bddbd75
Parents: dd69be2
Author: Alex Harui <aharui@apache.org>
Authored: Sat Jan 28 22:28:54 2017 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Sat Jan 28 22:28:54 2017 -0800

----------------------------------------------------------------------
 .../apache/flex/compiler/internal/projects/FlexProject.java | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/55ee9687/compiler/src/main/java/org/apache/flex/compiler/internal/projects/FlexProject.java
----------------------------------------------------------------------
diff --git a/compiler/src/main/java/org/apache/flex/compiler/internal/projects/FlexProject.java
b/compiler/src/main/java/org/apache/flex/compiler/internal/projects/FlexProject.java
index 602de21..9721d2a 100644
--- a/compiler/src/main/java/org/apache/flex/compiler/internal/projects/FlexProject.java
+++ b/compiler/src/main/java/org/apache/flex/compiler/internal/projects/FlexProject.java
@@ -2129,12 +2129,13 @@ public class FlexProject extends ASProject implements IFlexProject
             thisPackage = scopeDef.getPackageName();
         else
         {
-            if (scope instanceof PackageScope)
-                thisPackage = ((PackageScope)scope).getDefinition().getBaseName();
-            else
+            while (!(scope instanceof PackageScope))
             {
-                return null;
+            	scope = scope.getContainingScope();
             }
+            if (!(scope instanceof PackageScope))
+            	return null;
+            thisPackage = ((PackageScope)scope).getDefinition().getBaseName();
         }
         String package1 = def1.getPackageName();
         String package2 = def2.getPackageName();


Mime
View raw message