Closed
Description
Compiler version
3.0.0-3.6.3
Minimized code
Compile Foo
with Scala 2:
//> using scala 2.13.16
object Foo {
def a: Array[scala.Nothing] = ???
}
Then use the classfiles from Scala 2 when compiling the second file with Scala 3
//> using scala 3.6.3
@main def Test = Foo.a
Output
Exception in thread "main" java.lang.NoSuchMethodError: 'scala.runtime.Nothing$[] Foo$.a()'
at playground$package$.Test(playground.scala:1)
at Test.main(playground.scala:1)
Expectation
Work at runtime. The issue was introduced by #11846
Notes
Same if we have in the return type Array[scala.Null]