Skip to content

Commit 9ff0223

Browse files
committed
TreeUnpickler: Don't set Method flag late
Method is part of FromStartFlags
1 parent 16ce7e4 commit 9ff0223

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,11 @@ class TreeUnpickler(reader: TastyReader,
424424
flags = flags | (if (tag == VALDEF) ModuleValCreationFlags else ModuleClassCreationFlags)
425425
if (ctx.owner.isClass) {
426426
if (tag == TYPEPARAM) flags |= Param
427-
else if (tag == PARAM) flags |= ParamAccessor
427+
else if (tag == PARAM) {
428+
flags |= ParamAccessor
429+
if (!rhsIsEmpty) // param alias
430+
flags |= Method
431+
}
428432
}
429433
else if (isParamTag(tag)) flags |= Param
430434
flags
@@ -775,7 +779,6 @@ class TreeUnpickler(reader: TastyReader,
775779
ValDef(tpt)
776780
}
777781
else {
778-
sym.setFlag(Method)
779782
sym.info = ExprType(tpt.tpe)
780783
pickling.println(i"reading param alias $name -> $currentAddr")
781784
DefDef(Nil, Nil, tpt)

0 commit comments

Comments
 (0)