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

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

commit a4f5d2b667e535181fedc616a2011e84e9de5426
Author: Josh Tynjala <[email protected]>
AuthorDate: Tue Jun 20 13:46:13 2023 -0700

    SemanticUtils: fix bad cast for class/interface common base type detection 
and rename resolveCommonBaseInterface to resolveCommonBaseType
    
    I must have accidentally committed a partial refactor because a previous 
version worked correctly with royale-asjs without the cast exception
---
 .../apache/royale/compiler/internal/semantics/SemanticUtils.java  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/compiler/src/main/java/org/apache/royale/compiler/internal/semantics/SemanticUtils.java
 
b/compiler/src/main/java/org/apache/royale/compiler/internal/semantics/SemanticUtils.java
index bf013d4a1..a1b14f7ed 100644
--- 
a/compiler/src/main/java/org/apache/royale/compiler/internal/semantics/SemanticUtils.java
+++ 
b/compiler/src/main/java/org/apache/royale/compiler/internal/semantics/SemanticUtils.java
@@ -3567,7 +3567,7 @@ public class SemanticUtils
      * and there is no clear way to choose one of those common interfaces over
      * another.
      */
-    public static IInterfaceDefinition 
resolveCommonBaseInterface(IClassDefinition classA, IInterfaceDefinition 
interfaceB, ICompilerProject project)
+    public static IInterfaceDefinition resolveCommonType(IClassDefinition 
classA, IInterfaceDefinition interfaceB, ICompilerProject project)
     {
         if (classA == null || interfaceB == null)
         {
@@ -3591,9 +3591,9 @@ public class SemanticUtils
      * and there is no clear way to choose one of those common interfaces over
      * another.
      */
-    public static IInterfaceDefinition 
resolveCommonBaseInterface(IInterfaceDefinition interfaceA, IClassDefinition 
classB, ICompilerProject project)
+    public static IInterfaceDefinition resolveCommonType(IInterfaceDefinition 
interfaceA, IClassDefinition classB, ICompilerProject project)
     {
-        return resolveCommonBaseInterface(classB, interfaceA, project);
+        return resolveCommonType(classB, interfaceA, project);
     }
 
     /**
@@ -3659,7 +3659,7 @@ public class SemanticUtils
         }
         if (typeA instanceof IInterfaceDefinition && typeB instanceof 
IClassDefinition)
         {
-            return resolveCommonType((IClassDefinition) typeA, 
(IInterfaceDefinition) typeB, project);
+            return resolveCommonType((IClassDefinition) typeB, 
(IInterfaceDefinition) typeA, project);
         }
         return null;
     }

Reply via email to