Skip to content

Commit 8b21081

Browse files
committed
Adapt unpickling to the case where a parent is a block
It seems FromTasty printing has to do the same thing. For the moment the test default-super.scala fails in the printing phase, and is therefpre blacklisted.
1 parent 6edb091 commit 8b21081

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -855,7 +855,7 @@ class TreeUnpickler(reader: TastyReader,
855855
val vparams = readIndexedParams[ValDef](PARAM)
856856
val parents = collectWhile(nextByte != SELFDEF && nextByte != DEFDEF) {
857857
nextUnsharedTag match {
858-
case APPLY | TYPEAPPLY => readTerm()(parentCtx)
858+
case APPLY | TYPEAPPLY | BLOCK => readTerm()(parentCtx)
859859
case _ => readTpt()(parentCtx)
860860
}
861861
}

compiler/test/dotc/pos-from-tasty.blacklist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ annot-bootstrap.scala
1212

1313
# ScalaRunTime cannot be unpickled because it is already loaded
1414
repeatedArgs213.scala
15+
16+
# Error printing parent constructors that are blocks
17+
default-super.scala

0 commit comments

Comments
 (0)