Skip to content

Commit 046bca8

Browse files
committed
Add annotations for getters, setters and private fields
1 parent 00fd210 commit 046bca8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

compiler/src/dotty/tools/dotc/transform/ErasurePreservation.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ class ErasurePreservation extends MiniPhase {
150150
methodToInfos(Nil, other.widenExpr, tree.symbol.paramSymss.head, tree.symbol.isConstructor)
151151
case mt: MethodType =>
152152
methodToInfos(mt.paramInfos, mt.resType, Nil, false)
153-
// case tr: TypeRef =>
154-
// methodToInfos(Nil, tr, Nil, false)
153+
case tr: TypeRef =>
154+
methodToInfos(Nil, tr, Nil, false)
155155
// case et: ExprType =>
156156
// ???
157157
case other =>

compiler/src/dotty/tools/dotc/transform/Memoize.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ class Memoize extends MiniPhase with IdentityDenotTransformer { thisPhase =>
145145
val field = newField.asTerm
146146
var rhs = tree.rhs.changeOwnerAfter(sym, field, thisPhase)
147147
if (isWildcardArg(rhs)) rhs = EmptyTree
148-
val fieldDef = transformFollowing(ValDef(field, adaptToField(field, rhs)))
148+
val fieldDef = transformFollowing(ValDef(field, adaptToField(field, rhs))).withAttachmentsFrom(tree)
149149
val rhsClass = tree.tpt.tpe.widenDealias.classSymbol
150150
val getterRhs =
151151
if isErasableBottomField(field, rhsClass) then erasedBottomTree(rhsClass)

0 commit comments

Comments
 (0)