You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Reviews from #4410)
NullPointerException was thrown when I tried to convert null to Nothing in REPL:
scala>vala= (null.asInstanceOf[Nothing]:Null)
java.lang.NullPointerException
at rs$line$1$.<init>(rs$line$1:1)
at rs$line$1$.<clinit>(rs$line$1)
at rs$line$1.aShow(rs$line$1)
at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at dotty.tools.repl.Rendering.valueOf(Rendering.scala:58)
at dotty.tools.repl.Rendering.renderVal(Rendering.scala:79)
at dotty.tools.repl.ReplDriver.displayMembers$3$$anonfun$3(ReplDriver.scala:284)
at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:59)
at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:52)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
at scala.collection.TraversableLike.map(TraversableLike.scala:234)
at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
at scala.collection.AbstractTraversable.map(Traversable.scala:104)
at dotty.tools.repl.ReplDriver.displayMembers$7(ReplDriver.scala:284)
at dotty.tools.repl.ReplDriver.displayDefinitions$$anonfun$3$$anonfun$2(ReplDriver.scala:311)
at scala.Option.map(Option.scala:146)
at dotty.tools.repl.ReplDriver.displayDefinitions$$anonfun$1(ReplDriver.scala:311)
at dotty.tools.dotc.core.Periods.atPhase(Periods.scala:26)
at dotty.tools.dotc.core.Phases.atPhase(Phases.scala:36)
at dotty.tools.repl.ReplDriver.displayDefinitions(ReplDriver.scala:316)
at dotty.tools.repl.ReplDriver.compile$$anonfun$2(ReplDriver.scala:241)
at scala.util.Either.fold(Either.scala:188)
at dotty.tools.repl.ReplDriver.compile(ReplDriver.scala:242)
at dotty.tools.repl.ReplDriver.interpret(ReplDriver.scala:202)
at dotty.tools.repl.ReplDriver.loop$1(ReplDriver.scala:150)
at dotty.tools.repl.ReplDriver.runUntilQuit$$anonfun$1(ReplDriver.scala:154)
at dotty.tools.repl.ReplDriver.withRedirectedOutput$$anonfun$2$$anonfun$1(ReplDriver.scala:163)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)
at scala.Console$.withErr(Console.scala:192)
at dotty.tools.repl.ReplDriver.withRedirectedOutput$$anonfun$1(ReplDriver.scala:163)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)
at scala.Console$.withOut(Console.scala:163)
at dotty.tools.repl.ReplDriver.withRedirectedOutput(ReplDriver.scala:163)
at dotty.tools.repl.ReplDriver.runUntilQuit(ReplDriver.scala:154)
at dotty.tools.repl.Main$.main(Main.scala:6)
at dotty.tools.repl.Main.main(Main.scala)
But a is still defined and NoClassDefFoundError is thrown when use it:
scala> a
java.lang.NoClassDefFoundError:Could not initialize classrs$line$1$
at rs$line$2$.<init>(rs$line$2:1)
at rs$line$2$.<clinit>(rs$line$2)
at rs$line$2.res0Show(rs$line$2)
at sun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at dotty.tools.repl.Rendering.valueOf(Rendering.scala:58)
at dotty.tools.repl.Rendering.renderVal(Rendering.scala:79)
at dotty.tools.repl.ReplDriver.displayMembers$3$$anonfun$3(ReplDriver.scala:284)
at scala.collection.TraversableLike.$anonfun$map$1(TraversableLike.scala:234)
at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:59)
at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:52)
at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:48)
at scala.collection.TraversableLike.map(TraversableLike.scala:234)
at scala.collection.TraversableLike.map$(TraversableLike.scala:227)
at scala.collection.AbstractTraversable.map(Traversable.scala:104)
at dotty.tools.repl.ReplDriver.displayMembers$7(ReplDriver.scala:284)
at dotty.tools.repl.ReplDriver.displayDefinitions$$anonfun$3$$anonfun$2(ReplDriver.scala:311)
at scala.Option.map(Option.scala:146)
at dotty.tools.repl.ReplDriver.displayDefinitions$$anonfun$1(ReplDriver.scala:311)
at dotty.tools.dotc.core.Periods.atPhase(Periods.scala:26)
at dotty.tools.dotc.core.Phases.atPhase(Phases.scala:36)
at dotty.tools.repl.ReplDriver.displayDefinitions(ReplDriver.scala:316)
at dotty.tools.repl.ReplDriver.compile$$anonfun$2(ReplDriver.scala:241)
at scala.util.Either.fold(Either.scala:188)
at dotty.tools.repl.ReplDriver.compile(ReplDriver.scala:242)
at dotty.tools.repl.ReplDriver.interpret(ReplDriver.scala:202)
at dotty.tools.repl.ReplDriver.loop$1(ReplDriver.scala:150)
at dotty.tools.repl.ReplDriver.runUntilQuit$$anonfun$1(ReplDriver.scala:154)
at dotty.tools.repl.ReplDriver.withRedirectedOutput$$anonfun$2$$anonfun$1(ReplDriver.scala:163)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)
at scala.Console$.withErr(Console.scala:192)
at dotty.tools.repl.ReplDriver.withRedirectedOutput$$anonfun$1(ReplDriver.scala:163)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)
at scala.Console$.withOut(Console.scala:163)
at dotty.tools.repl.ReplDriver.withRedirectedOutput(ReplDriver.scala:163)
at dotty.tools.repl.ReplDriver.runUntilQuit(ReplDriver.scala:154)
at dotty.tools.repl.Main$.main(Main.scala:6)
at dotty.tools.repl.Main.main(Main.scala)
This behavior is beyond my expectation!
The text was updated successfully, but these errors were encountered:
(Reviews from #4410)
NullPointerException was thrown when I tried to convert null to Nothing in REPL:
But a is still defined and NoClassDefFoundError is thrown when use it:
This behavior is beyond my expectation!
The text was updated successfully, but these errors were encountered: