Found a bug?
David Alayachew
davidalayachew at gmail.com
Sat Jul 15 01:32:52 UTC 2023
Hello Amber Dev Team,
I was working on a project when, upon compilation, an exception occurred in
the compiler. Here is the error message.
david at 123 MINGW64 ~/_TESTING/io/github/davidalayachew/Calculator (main)
$ ls
Addition.java ConsEmpty.java Division.java
Operator.java Symbol.java
Calculator.java ConsIntegerDigit.java IntegerDigitList.java
State.java SymbolCategory.java
ConsDecimalDigit.java Constant.java InternalState.java
SubState.java
ConsDecimalPoint.java DecimalDigitList.java Multiplication.java
Subtraction.java
david at 123 MINGW64 ~/_TESTING/io/github/davidalayachew/Calculator (main)
$ javac *.java
An exception has occurred in the compiler (21-ea). Please file a bug
against the Java compiler via the Java bug reporting page (
https://bugreport.java.com) after checking the Bug Database (
https://bugs.java.com) for duplicates. Include your program, the following
diagnostic, and the parameters passed to the Java compiler in your report.
Thank you.
java.lang.AssertionError: Unknown pattern: ANYPATTERN
at
jdk.compiler/com.sun.tools.javac.util.Assert.error(Assert.java:162)
at
jdk.compiler/com.sun.tools.javac.comp.Check.patternDominated(Check.java:4759)
at
jdk.compiler/com.sun.tools.javac.comp.Check.patternDominated(Check.java:4748)
at
jdk.compiler/com.sun.tools.javac.comp.Check.checkSwitchCaseLabelDominated(Check.java:4703)
at
jdk.compiler/com.sun.tools.javac.comp.Attr.handleSwitch(Attr.java:1850)
at
jdk.compiler/com.sun.tools.javac.comp.Attr.visitSwitchExpression(Attr.java:1629)
at
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCSwitchExpression.accept(JCTree.java:1399)
at
jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:662)
at
jdk.compiler/com.sun.tools.javac.comp.Attr.visitYield(Attr.java:2326)
at
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCYield.accept(JCTree.java:1677)
at
jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:662)
at
jdk.compiler/com.sun.tools.javac.comp.Attr.attribStat(Attr.java:736)
at
jdk.compiler/com.sun.tools.javac.comp.Attr.attribStats(Attr.java:755)
at
jdk.compiler/com.sun.tools.javac.comp.Attr.lambda$visitSwitchExpression$7(Attr.java:1631)
at
jdk.compiler/com.sun.tools.javac.comp.Attr.handleSwitch(Attr.java:1839)
at
jdk.compiler/com.sun.tools.javac.comp.Attr.visitSwitchExpression(Attr.java:1629)
at
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCSwitchExpression.accept(JCTree.java:1399)
at
jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:662)
at
jdk.compiler/com.sun.tools.javac.comp.Attr.visitReturn(Attr.java:2464)
at
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCReturn.accept(JCTree.java:1728)
at
jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:662)
at
jdk.compiler/com.sun.tools.javac.comp.Attr.attribStat(Attr.java:736)
at
jdk.compiler/com.sun.tools.javac.comp.Attr.attribStats(Attr.java:755)
at
jdk.compiler/com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:1439)
at
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1092)
at
jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:662)
at
jdk.compiler/com.sun.tools.javac.comp.Attr.attribStat(Attr.java:736)
at
jdk.compiler/com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:1229)
at
jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:916)
at
jdk.compiler/com.sun.tools.javac.comp.Attr.attribTree(Attr.java:662)
at
jdk.compiler/com.sun.tools.javac.comp.Attr.attribStat(Attr.java:736)
at
jdk.compiler/com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:5644)
at
jdk.compiler/com.sun.tools.javac.comp.Attr.attribClass(Attr.java:5532)
at
jdk.compiler/com.sun.tools.javac.comp.Attr.attribClass(Attr.java:5356)
at jdk.compiler/com.sun.tools.javac.comp.Attr.attrib(Attr.java:5295)
at
jdk.compiler/com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1358)
at
jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:978)
at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:319)
at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:178)
at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:64)
at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:50)
I have also attached a zip file containing the project and the generated
output from this error. If this is indeed a bug, I will submit a bug for it
like the error requested. But I wanted to check here first.
Thank you for your time and help!
David Alayachew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/amber-dev/attachments/20230714/32ec8d2f/attachment-0001.htm>
More information about the amber-dev
mailing list