Skip to content

Commit

Permalink
Merge pull request #425 from sjrd/work-around-upstream-package-param
Browse files Browse the repository at this point in the history
Work around scala/scala3#19237
  • Loading branch information
sjrd authored Dec 18, 2023
2 parents d44af7b + 6200185 commit e711b4a
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -759,10 +759,19 @@ private[tasties] class TreeUnpickler private (
else if tag == VALDEF then Some(readTermOrUninitialized())
else Some(readTerm)
readAnnotationsInModifiers(symbol, end)

tag match {
case VALDEF | PARAM =>
symbol.withDeclaredType(tpt.toType)
val tpe: Type = tpt.toPrefix match
case tpe: Type =>
tpe
case packageRef: PackageRef =>
// Work around https://github.com/lampepfl/dotty/issues/19237
if tag == PARAM && symbol.owner.name.isInstanceOf[InlineAccessorName] then rctx.NothingType
else throw TastyFormatException(s"unexpected type $packageRef for $symbol in $posErrorMsg")
symbol.withDeclaredType(tpe)
definingTree(symbol, ValDef(name, tpt, rhs, symbol)(spn))

case DEFDEF =>
val normalizedParams =
if name == nme.Constructor then normalizeCtorParamClauses(params)
Expand Down

0 comments on commit e711b4a

Please sign in to comment.