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
scala>classFoo { overridedeftoString=null }
// defined class Foo
scala>newFoo()
Output (click arrow to expand)
Exception in thread "main" java.lang.NullPointerException:Cannot invoke "String.length()" because "str" is null
at dotty.tools.repl.Rendering.truncate(Rendering.scala:92)
at dotty.tools.repl.Rendering.classLoader$$anonfun$1(Rendering.scala:79)
at dotty.tools.repl.Rendering.classLoader$$anonfun$adapted$1(Rendering.scala:85)
at dotty.tools.repl.Rendering.replStringOf(Rendering.scala:102)
at dotty.tools.repl.Rendering.$anonfun$5(Rendering.scala:115)
at scala.Option.map(Option.scala:242)
at dotty.tools.repl.Rendering.valueOf(Rendering.scala:115)
at dotty.tools.repl.Rendering.renderVal(Rendering.scala:157)
at dotty.tools.repl.ReplDriver.$anonfun$7(ReplDriver.scala:365)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
at scala.collection.immutable.List.foreach(List.scala:333)
at dotty.tools.repl.ReplDriver.extractAndFormatMembers$1(ReplDriver.scala:371)
at dotty.tools.repl.ReplDriver.renderDefinitions$$anonfun$2(ReplDriver.scala:403)
at scala.Option.map(Option.scala:242)
at dotty.tools.repl.ReplDriver.renderDefinitions(ReplDriver.scala:409)
at dotty.tools.repl.ReplDriver.compile$$anonfun$2(ReplDriver.scala:307)
at scala.util.Either.fold(Either.scala:189)
at dotty.tools.repl.ReplDriver.compile(ReplDriver.scala:323)
at dotty.tools.repl.ReplDriver.interpret(ReplDriver.scala:248)
at dotty.tools.repl.ReplDriver.loop$1(ReplDriver.scala:168)
at dotty.tools.repl.ReplDriver.runUntilQuit$$anonfun$1(ReplDriver.scala:171)
at dotty.tools.repl.ReplDriver.withRedirectedOutput(ReplDriver.scala:191)
at dotty.tools.repl.ReplDriver.runBody$$anonfun$1(ReplDriver.scala:179)
at dotty.tools.runner.ScalaClassLoader$.asContext(ScalaClassLoader.scala:80)
at dotty.tools.repl.ReplDriver.runBody(ReplDriver.scala:179)
at dotty.tools.repl.ReplDriver.runUntilQuit(ReplDriver.scala:171)
at dotty.tools.repl.ReplDriver.tryRunning(ReplDriver.scala:133)
at dotty.tools.repl.Main$.main(Main.scala:7)
at dotty.tools.repl.Main.main(Main.scala)
Compiler version
3.2.2
Minimized code
Output (click arrow to expand)
Expectation
Scala 2.13 prints the following:
The text was updated successfully, but these errors were encountered: