Closed
Description
Compiler version
main
Minimized code
(minimised from run/t2552.scala
)
def testTakeWhile = {
val numbers = Iterator.range(0, 50)
def zeroTo9 = numbers.takeWhile(_ => true)
}
To reproduce it, first set the Scala 2 library to the capture checked one:
sbt> set ThisBuild/Build.scala2Library := Build.Scala2LibraryCCTasty
Output
An unhandled exception was thrown in the compiler.
Please file a crash report here:
https://github.com/lampepfl/dotty/issues/new/choose
For non-enriched exceptions, compile with -Yno-enrich-error-messages.
while compiling: issues/t2552.scala
during phase: pickler
mode: Mode(ImplicitsEnabled)
library version: version 2.13.12
compiler version: version 3.4.2-RC1-bin-SNAPSHOT-git-c7a0459
settings: -Vprint List(typer) -classpath /Users/linyxus/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.12/scala-library-2.13.12.jar:/Users/linyxus/Workspace/dotty/library/../out/bootstrap/scala3-library-bootstrapped/scala-3.4.2-RC1-bin-SNAPSHOT-nonbootstrapped/scala3-library_3-3.4.2-RC1-bin-SNAPSHOT.jar:/Users/linyxus/Workspace/dotty/scala2-library-cc-tasty/../out/bootstrap/scala2-library-cc-tasty/scala-3.4.2-RC1-bin-SNAPSHOT-nonbootstrapped/scala2-library-cc-tasty-experimental_3-3.4.2-RC1-bin-SNAPSHOT.jar -d /
scala.MatchError: TermRef(NoPrefix,val numbers) (of class dotty.tools.dotc.core.Types$CachedTermRef)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:418)
at dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$8(TreePickler.scala:549)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:15)
at scala.runtime.function.JProcedure1.apply(JProcedure1.java:10)
...