Skip to content

Commit 454659a

Browse files
committed
Force simple names in fieldName.
Otherwise, the `fieldName` of a getter and the corresponding *trait setter* might not have the same internal structure, in case the val was private and had to be converted into an expanded name.
1 parent 0617a7c commit 454659a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/core/NameOps.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ object NameOps {
270270
original.fieldName
271271
}
272272
else getterName.fieldName
273-
else FieldName(name)
273+
else FieldName(name.toSimpleName)
274274

275275
def stripScala2LocalSuffix: TermName =
276276
if (name.isScala2LocalSuffix) name.asSimpleName.dropRight(1) else name

0 commit comments

Comments
 (0)