Skip to content

Commit c2bb54f

Browse files
committed
.
1 parent fb06141 commit c2bb54f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

content/unroll-default-arguments.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,11 +419,13 @@ object Unrolled{
419419

420420
Notes:
421421

422-
1. `.unapply` does not need to be duplicated in Scala 3.x, as its signature
422+
1. `@unroll`ed `case class`es are fully binary and backwards compatible in Scala 3, but not in Scala 2
423+
424+
2. `.unapply` does not need to be duplicated in Scala 3.x, as its signature
423425
`def unapply(x: Unrolled): Unrolled` does not change when new `case class` fields are
424426
added.
425427

426-
2. Even in Scala 2.x, where `def unapply(x: Unrolled): Option[TupleN]` is not
428+
3. Even in Scala 2.x, where `def unapply(x: Unrolled): Option[TupleN]` is not
427429
binary compatible, pattern matching on `case class`es is already binary compatible
428430
to addition of new fields due to
429431
[Option-less Pattern Matching](https://docs.scala-lang.org/scala3/reference/changed-features/pattern-matching.html).

0 commit comments

Comments
 (0)