Skip to content

Conversation

@hamzaremmal
Copy link
Member

  • Code is legit and should work.
  • The error was indeed present in 3.1.3 and not present anymore:
exception occurred while compiling test.scala
java.lang.AssertionError: assertion failed: method $anonfun while compiling test.scala
Exception in thread "main" java.lang.AssertionError: assertion failed: method $anonfun
        at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
        at dotty.tools.dotc.core.tasty.TreePickler.pickleDef(TreePickler.scala:324)
        at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:559)
        at dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$9$$anonfun$1(TreePickler.scala:468)

Closes #15786

@Gedochao Gedochao merged commit c9309e7 into scala:main Dec 4, 2025
46 checks passed
lidaisy pushed a commit to lidaisy/scala3 that referenced this pull request Dec 5, 2025
- Code is legit and should work.
- The error was indeed present in `3.1.3` and not present anymore:
```scala
exception occurred while compiling test.scala
java.lang.AssertionError: assertion failed: method $anonfun while compiling test.scala
Exception in thread "main" java.lang.AssertionError: assertion failed: method $anonfun
        at scala.runtime.Scala3RunTime$.assertFailed(Scala3RunTime.scala:8)
        at dotty.tools.dotc.core.tasty.TreePickler.pickleDef(TreePickler.scala:324)
        at dotty.tools.dotc.core.tasty.TreePickler.pickleTree(TreePickler.scala:559)
        at dotty.tools.dotc.core.tasty.TreePickler.pickleTree$$anonfun$9$$anonfun$1(TreePickler.scala:468)
```

Closes scala#15786
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

error when pickling tree: assertion failed: method $anonfun

2 participants