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


The following commit(s) were added to refs/heads/develop by this push:
     new d678e7269 ProblemQuery: Fixed missing Generated byte code contains an 
operand stack underflow error when warnings are reported, but not other errors
d678e7269 is described below

commit d678e7269fd54106da0868f79bea0d80694ea5f2
Author: Josh Tynjala <[email protected]>
AuthorDate: Mon Jul 13 10:20:56 2026 -0700

    ProblemQuery: Fixed missing Generated byte code contains an operand stack 
underflow error when warnings are reported, but not other errors
    
    The CodeGenErrorFilter should have been checking the severity.
---
 RELEASE_NOTES.md                                    |  1 +
 .../clients/problems/CodeGenErrorFilter.java        | 21 ++++++++++++++++++++-
 .../compiler/clients/problems/ProblemQuery.java     |  2 +-
 3 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 3dce01be2..e72b3436c 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -88,6 +88,7 @@ Apache Royale Compiler 1.0.0
 - compiler: Fixed missing binding data caused by thread conflicts.
 - compiler: Fixed lost typing information in method bodies when emitting 
JavaScript in some circumstances.
 - compiler: Fixed missing symbols specified with `-includes` compiler option 
in generated JS.
+- compiler: Fixed missing "Generated byte code contains an operand stack 
underflow" error when warnings are reported without other errors.
 - 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-common/src/main/java/org/apache/royale/compiler/clients/problems/CodeGenErrorFilter.java
 
b/compiler-common/src/main/java/org/apache/royale/compiler/clients/problems/CodeGenErrorFilter.java
index 533688bbf..f932d3aa8 100644
--- 
a/compiler-common/src/main/java/org/apache/royale/compiler/clients/problems/CodeGenErrorFilter.java
+++ 
b/compiler-common/src/main/java/org/apache/royale/compiler/clients/problems/CodeGenErrorFilter.java
@@ -19,6 +19,7 @@
 
 package org.apache.royale.compiler.clients.problems;
 
+import org.apache.royale.compiler.problems.CompilerProblemSeverity;
 import org.apache.royale.compiler.problems.ICompilerProblem;
 import org.apache.royale.compiler.problems.IOperandStackUnderflowProblem;
 
@@ -50,11 +51,29 @@ public class CodeGenErrorFilter implements IProblemFilter
     }
 
     public boolean hasOtherErrors(Iterable<ICompilerProblem> problems)
+    {
+        return hasOtherErrors(problems, null);
+    }
+
+    public boolean hasOtherErrors(Iterable<ICompilerProblem> problems, 
CompilerProblemCategorizer categorizer)
     {
         for (ICompilerProblem problem : problems)
         {
             if (!(problem instanceof IOperandStackUnderflowProblem))
-                return true;
+            {
+                if (categorizer != null)
+                {
+                    CompilerProblemSeverity severity = 
categorizer.getProblemSeverity(problem); 
+                    if (severity == CompilerProblemSeverity.ERROR)
+                    {  
+                        return true;
+                    }
+                }
+                else
+                {
+                    return true;
+                }
+            }
         }
         return false;
     }
diff --git 
a/compiler-common/src/main/java/org/apache/royale/compiler/clients/problems/ProblemQuery.java
 
b/compiler-common/src/main/java/org/apache/royale/compiler/clients/problems/ProblemQuery.java
index 32bf3f0c9..612bd0858 100644
--- 
a/compiler-common/src/main/java/org/apache/royale/compiler/clients/problems/ProblemQuery.java
+++ 
b/compiler-common/src/main/java/org/apache/royale/compiler/clients/problems/ProblemQuery.java
@@ -220,7 +220,7 @@ public class ProblemQuery
         CompilerProblemCategorizer categorizer = new 
CompilerProblemCategorizer(problemSettings);
      
         CodeGenErrorFilter cgef = new CodeGenErrorFilter();
-        if (cgef.hasOtherErrors(problems))
+        if (cgef.hasOtherErrors(problems, categorizer))
         {
             filter = CompositeProblemFilter.and(filter, cgef);
         }

Reply via email to