Skip to content

Conversation

@jchyb
Copy link
Contributor

@jchyb jchyb commented Dec 19, 2025

Starting with scala.3.8, standard library will now be compiled with scala 3, instead of reusing scala 2 artifacts. This means that the way certain symbols are represented will change. For this project, we've run into an issue, where for:

sealed abstract class Infinite
val Undefined: Infinite = new Infinite {}

scala 2 would generate a <local child> symbol to assign to the child anonymous class, and scala 3 would intentionally reuse the parent symbol with the same goal - both behaviors are intended for pattern matcher to be able to give exhaustivity errors.
In this fix here, we handle the scala 3 local child the same way we did for the scala 2 counterpart.
Related discussion: scala/scala3#24598

@plokhotnyuk plokhotnyuk merged commit 6a4d9ed into plokhotnyuk:master Dec 19, 2025
4 checks passed
@plokhotnyuk
Copy link
Owner

@jchyb Thanks a lot for explanations and the contribution!

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.

2 participants