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 fad7ee8c1504c14b2938dc2f6e2f3c3939e918a2
Author: Josh Tynjala <[email protected]>
AuthorDate: Tue Mar 31 11:09:43 2026 -0700

    DefinitionBase: fix resolution of types specified in [InstanceType] when 
they are in a package
---
 RELEASE_NOTES.md                                                      | 1 +
 .../apache/royale/compiler/internal/definitions/DefinitionBase.java   | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 189d45f11..cdd1a9a2f 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -69,6 +69,7 @@ Apache Royale Compiler 1.0.0
 - compiler: Fixed property assignment in MXML factory methods when using data 
binding.
 - compiler: Fixed `<fx:DesignLayer>` allowing children without 
`[DefaultProperty]` metadata.
 - compiler: Added `${mainClass}` token to HTML template replacement.
+- compiler: Fixed resolution of `[InstanceType]` classes when they are in a 
package.
 - debugger: Added missing isolate ID to SWF load and unload events.
 - debugger: Fixed debugger targeting the current JDK version instead of the 
intended minimum JDK version.
 - debugger: Fixed localized messages appearing as unprocessed tokens.
diff --git 
a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/DefinitionBase.java
 
b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/DefinitionBase.java
index d4dc74a0f..60bca1baa 100644
--- 
a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/DefinitionBase.java
+++ 
b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/DefinitionBase.java
@@ -47,6 +47,7 @@ import 
org.apache.royale.compiler.definitions.IDocumentableDefinition;
 import org.apache.royale.compiler.definitions.INamespaceDefinition;
 import org.apache.royale.compiler.definitions.IPackageDefinition;
 import org.apache.royale.compiler.definitions.IScopedDefinition;
+import org.apache.royale.compiler.definitions.ITypeDefinition;
 import org.apache.royale.compiler.definitions.metadata.IDeprecationInfo;
 import org.apache.royale.compiler.definitions.metadata.IMetaTag;
 import org.apache.royale.compiler.definitions.metadata.IMetaTagAttribute;
@@ -1553,7 +1554,8 @@ public abstract class DefinitionBase implements 
IDocumentableDefinition, IDefini
      */
     public String getInstanceType(ICompilerProject project)
     {
-        if 
(getTypeAsDisplayString().equals(((RoyaleProject)project).getDeferredInstanceInterface()))
+        ITypeDefinition typeDef = resolveType(project);
+        if (typeDef != null && 
typeDef.getQualifiedName().equals(((RoyaleProject)project).getDeferredInstanceInterface()))
         {
             return getPropertyMetaTagValue(
                     (RoyaleProject)project, 
IMetaAttributeConstants.ATTRIBUTE_INSTANCETYPE);

Reply via email to