Open xuwei-k opened 4 years ago
Now we get a compilation failure
exception in thread "main" java.lang.AssertionError: assertion failed: <none>
at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
at dotty.tools.dotc.transform.Erasure$Typer.typedSelect(Erasure.scala:721)
at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:2644)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2735)
at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2801)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2805)
at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2921)
at dotty.tools.dotc.transform.Erasure$Typer.typedTypeApply(Erasure.scala:815)
at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2693)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2736)
at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2801)
at dotty.tools.dotc.typer.Typer.typed(Typer.scala:2805)
at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:2921)
at dotty.tools.dotc.transform.Erasure$Typer.typedApply(Erasure.scala:837)
at dotty.tools.dotc.typer.Typer.typedUnnamed$1(Typer.scala:2674)
at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:2736)
at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:118)
It looks like this has actually regressed back to the original state where you don't get a compilation failure, but rather a runtime one:
Compiling project (Scala 3.3.1-RC1-bin-20230511-5c4e597-NIGHTLY, JVM)
Compiled project (Scala 3.3.1-RC1-bin-20230511-5c4e597-NIGHTLY, JVM)
Exception in thread "main" java.lang.NoClassDefFoundError: scala/Function23
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1012)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:862)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:760)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:681)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
at Main$.main(example.scala:54)
at Main.main(example.scala)
Caused by: java.lang.ClassNotFoundException: scala.Function23
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 11 more
@smarter I'm unassigning you on the assumption you don't plan to return to this, but feel free to re-claim it, of course :-)
minimized code
dotty version:
0.23.0-bin-20200304-16c30fb-NIGHTLY
sbt run
expectation
support FunctionXXL or compile error. Don't throw runtime error.