diff --git a/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala b/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala index d85bc0ed75d0..f29dec54030c 100644 --- a/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala +++ b/compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala @@ -254,7 +254,7 @@ class DottyBackendInterface(outputDirectory: AbstractFile, val superCallsMap: Ma } case t: TypeApply if (t.fun.symbol == Predef_classOf) => av.visit(name, t.args.head.tpe.classSymbol.denot.info.toTypeKind(bcodeStore)(innerClasesStore).toASMType) - case t: tpd.Select => + case t: tpd.RefTree => if (t.symbol.denot.owner.is(Flags.JavaEnum)) { val edesc = innerClasesStore.typeDescriptor(t.tpe.asInstanceOf[bcodeStore.int.Type]) // the class descriptor of the enumeration class. val evalue = t.symbol.name.mangledString // value the actual enumeration value. diff --git a/tests/pos/i6151/Expect.java b/tests/pos/i6151/Expect.java new file mode 100644 index 000000000000..5117c6cba094 --- /dev/null +++ b/tests/pos/i6151/Expect.java @@ -0,0 +1 @@ +public enum Expect { ExpectVal } diff --git a/tests/pos/i6151/Outcome.java b/tests/pos/i6151/Outcome.java new file mode 100644 index 000000000000..f414fe232bd8 --- /dev/null +++ b/tests/pos/i6151/Outcome.java @@ -0,0 +1 @@ +public @interface Outcome { Expect enm(); } \ No newline at end of file diff --git a/tests/pos/i6151/Test.scala b/tests/pos/i6151/Test.scala new file mode 100644 index 000000000000..d04385bb6b93 --- /dev/null +++ b/tests/pos/i6151/Test.scala @@ -0,0 +1,3 @@ +import Expect._ +@Outcome(ExpectVal) +class SimpleTest