Skip to content

Commit 9d9b195

Browse files
Use IF for pickling of match with sub cases
1 parent 24bdb6e commit 9d9b195

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

compiler/src/dotty/tools/dotc/core/tasty/TreePickler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ class TreePickler(pickler: TastyPickler, attributes: Attributes) {
590590
if (tree.isInline)
591591
if (selector.isEmpty) writeByte(IMPLICIT)
592592
else { writeByte(INLINE); pickleTree(selector) }
593-
else if tree.isSubMatch then { writeByte(WITH); pickleTree(selector) }
593+
else if tree.isSubMatch then { writeByte(IF); pickleTree(selector) }
594594
else pickleTree(selector)
595595
tree.cases.foreach(pickleTree)
596596
}

compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1539,7 +1539,7 @@ class TreeUnpickler(reader: TastyReader,
15391539
readByte()
15401540
InlineMatch(readTree(), readCases(end))
15411541
}
1542-
else if nextByte == WITH then
1542+
else if nextByte == IF then
15431543
readByte()
15441544
SubMatch(readTree(), readCases(end))
15451545
else Match(readTree(), readCases(end)))

tasty/src/dotty/tools/tasty/TastyFormat.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,6 @@ object TastyFormat {
511511
final val EMPTYCLAUSE = 45
512512
final val SPLITCLAUSE = 46
513513
final val TRACKED = 47
514-
final val WITH = 48
515514

516515
// Tree Cat. 2: tag Nat
517516
final val firstNatTreeTag = SHAREDterm

0 commit comments

Comments
 (0)