File tree Expand file tree Collapse file tree
compiler/scala/tools/nsc/symtab/classfile
reflect/scala/reflect/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ abstract class ClassfileParser(reader: ReusableInstance[ReusableDataReader]) {
212212 case CONSTANT_METHODHANDLE => in skip 3
213213 case CONSTANT_FIELDREF | CONSTANT_METHODREF | CONSTANT_INTFMETHODREF => in skip 4
214214 case CONSTANT_NAMEANDTYPE | CONSTANT_INTEGER | CONSTANT_FLOAT => in skip 4
215- case CONSTANT_INVOKEDYNAMIC => in skip 4
215+ case CONSTANT_DYNAMIC | CONSTANT_INVOKEDYNAMIC => in skip 4
216216 case CONSTANT_LONG | CONSTANT_DOUBLE => in skip 8 ; i += 1
217217 case _ => errorBadTag(in.bp - 1 )
218218 }
Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ object ClassfileConstants {
8181 final val CONSTANT_NAMEANDTYPE = 12
8282 final val CONSTANT_METHODHANDLE = 15
8383 final val CONSTANT_METHODTYPE = 16
84+ final val CONSTANT_DYNAMIC = 17
8485 final val CONSTANT_INVOKEDYNAMIC = 18
8586 final val CONSTANT_MODULE = 19
8687 final val CONSTANT_PACKAGE = 20
Original file line number Diff line number Diff line change 1+ // javaVersion: 21+
2+
3+ public class A_1 {
4+ public int f (Object s ) {
5+ switch (s ) {
6+ case Res .R -> {
7+ return 1 ;
8+ }
9+ default -> {
10+ return 3 ;
11+ }
12+ }
13+ }
14+ static enum Res {
15+ R
16+ }
17+ }
Original file line number Diff line number Diff line change 1+ // javaVersion: 21+
2+
3+ class B {
4+ def bar = (new A_1 ).f(null )
5+ }
You can’t perform that action at this time.
0 commit comments