Skip to content

Commit 8394d19

Browse files
committed
Fixed TreeUnpickler not being at the end of a length-annotated type after reading it.
1 parent 4d8213b commit 8394d19

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,10 @@ class TreeUnpickler(reader: TastyReader,
278278
// Eta expansion of the latter puts readType() out of the expression.
279279
}
280280
}
281-
typeAtAddr.getOrElse(start, readRefined)
281+
typeAtAddr.get(start) match {
282+
case None => readRefined
283+
case Some(tp) => goto(end); tp
284+
}
282285
case APPLIEDtype =>
283286
readType().appliedTo(until(end)(readType()))
284287
case APPLIEDTERMREF =>

0 commit comments

Comments
 (0)