-
Notifications
You must be signed in to change notification settings - Fork 1.1k
REPL: missing span with valid code and -Xprint:<some phase> #10883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Milestone
Comments
I get the same error in the REPL for i.e. `scala -Xprint:erasure` with input `1+1`$ scala -Xprint:erasure
Starting scala3 REPL...
scala> 1+1
Exception in thread "main" java.lang.AssertionError: assertion failed
at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:11)
at dotty.tools.dotc.util.Spans$Span$.point$extension(Spans.scala:56)
at dotty.tools.dotc.util.SourcePosition.point(SourcePosition.scala:26)
at dotty.tools.dotc.util.SourcePosition.line(SourcePosition.scala:28)
at dotty.tools.repl.ReplDriver.$anonfun$5(ReplDriver.scala:261)
at scala.math.Ordering$$anon$1.compare(Ordering.scala:140)
at java.base/java.util.TimSort.countRunAndMakeAscending(TimSort.java:355)
at java.base/java.util.TimSort.sort(TimSort.java:220)
at java.base/java.util.Arrays.sort(Arrays.java:1232)
at scala.collection.SeqOps.sorted(Seq.scala:700)
at scala.collection.SeqOps.sorted$(Seq.scala:692)
at scala.collection.immutable.List.scala$collection$immutable$StrictOptimizedSeqOps$$super$sorted(List.scala:79)
at scala.collection.immutable.StrictOptimizedSeqOps.sorted(StrictOptimizedSeqOps.scala:78)
at scala.collection.immutable.StrictOptimizedSeqOps.sorted$(StrictOptimizedSeqOps.scala:78)
at scala.collection.immutable.List.sorted(List.scala:79)
at dotty.tools.repl.ReplDriver.compile$$anonfun$2(ReplDriver.scala:264)
at scala.util.Either.fold(Either.scala:189)
at dotty.tools.repl.ReplDriver.compile(ReplDriver.scala:269)
at dotty.tools.repl.ReplDriver.interpret(ReplDriver.scala:197)
at dotty.tools.repl.ReplDriver.loop$1(ReplDriver.scala:130)
at dotty.tools.repl.ReplDriver.runUntilQuit$$anonfun$1(ReplDriver.scala:133)
at dotty.tools.repl.ReplDriver.withRedirectedOutput(ReplDriver.scala:152)
at dotty.tools.repl.ReplDriver.runUntilQuit(ReplDriver.scala:133)
at dotty.tools.repl.Main$.main(Main.scala:6)
at dotty.tools.repl.Main.main(Main.scala) |
Minimized, it fails on |
thanks both, if there is a type error then apparently there is no issue with printing the trees |
liufengyun
added a commit
that referenced
this issue
Feb 12, 2021
Fix #10883: Override `line` and `column` in NoSourcePosition
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Minimized code
The following only crashes when using the REPL with the option
-Xprint:typer
:Output (click arrow to expand)
The text was updated successfully, but these errors were encountered: