Skip to content
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

Pickler crashes with CC Scala 2 library #19859

Closed
Linyxus opened this issue Mar 3, 2024 · 0 comments · Fixed by #19860
Closed

Pickler crashes with CC Scala 2 library #19859

Linyxus opened this issue Mar 3, 2024 · 0 comments · Fixed by #19860
Assignees
Labels
area:experimental:cc Capture checking related itype:bug
Milestone

Comments

@Linyxus
Copy link
Contributor

Linyxus commented Mar 3, 2024

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)
...
@Linyxus Linyxus added itype:bug stat:needs triage Every issue needs to have an "area" and "itype" label labels Mar 3, 2024
@Linyxus Linyxus self-assigned this Mar 3, 2024
@Linyxus Linyxus added area:experimental:cc Capture checking related and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Mar 3, 2024
@Linyxus Linyxus mentioned this issue Mar 3, 2024
Linyxus added a commit that referenced this issue Mar 4, 2024
@Kordyjan Kordyjan added this to the 3.4.2 milestone Mar 28, 2024
@Kordyjan Kordyjan modified the milestones: 3.4.2, 3.5.0 May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:experimental:cc Capture checking related itype:bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants