Skip to content

Scala 3 extractors and Scala 2 binary compatibility #21563

Discussion options

You must be logged in to vote

So Scala 2 is binary compatible with Scala 3, in that the Scala 3 compiler can understand and compile code against a Scala 2 library. But Scala 3 decided to change the return type of case class unapplies, and that is an improvement in Scala 3. But it's still able to consider Scala 2's unapplies as extractors, and case class extractors at that (i.e. irrefutable). If you use reflection, you'll see the difference - but that doesn't make them "incompatible".

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@kincsescsaba
Comment options

Answer selected by kincsescsaba
Comment options

You must be logged in to vote
1 reply
@kincsescsaba
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants