aharui closed pull request #56: Fixing bug with static function resolution
URL: https://github.com/apache/royale-compiler/pull/56
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/TypeDefinitionBase.java
 
b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/TypeDefinitionBase.java
index 7c93007bd..dacad9d31 100644
--- 
a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/TypeDefinitionBase.java
+++ 
b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/TypeDefinitionBase.java
@@ -317,12 +317,19 @@ protected void init(ITypeDefinition initialType, boolean 
skipThis)
         {
             this.initialType = initialType;
 
-            stack.push(initialType);
+            // bottom of the stack should be the Class type
             ITypeDefinition classType = 
(ITypeDefinition)project.getBuiltinType(BuiltinType.CLASS);
             stack.push(classType);
-
+            // add our initial type onto the stack, unless we're skipping it 
where we
+            // just add it straight to the visited list (see definitions of 
'next()' && 'pushChildren()')
             if (skipThis)
-                next();
+            {
+                visited.add(initialType);
+            }
+            else
+            {
+                stack.push(initialType);
+            }
         }
 
         @Override


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to