Skip to content

Cannot access enum from dependency at runtime #7991

Closed
@nicolasstucki

Description

@nicolasstucki

minimized code

Num.scala

enum Num { case One }

Test.scala

object Test extends App {
  Num.One
}
$ mkdir out2
$ sbt
> dotc -d out2 Num.scala
> dotc -d out2 -classpath out2 Test.scala
> dotr -classpath out2 Test
Exception in thread "main" java.lang.NoSuchFieldError: One
        at Test$.<init>(Test_2.scala:2)
        at Test$.<clinit>(Test_2.scala)
        at Test.main(Test_2.scala)

expectation

Should run

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions