Skip to content

Commit 9b91a2c

Browse files
committed
Polishing
1 parent e4d317f commit 9b91a2c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ class SymUtils(val self: Symbol) extends AnyVal {
9898
else accessorNamed(self.asTerm.name.setterName)
9999

100100
def field(implicit ctx: Context): Symbol = {
101-
val fieldName = if (self.hasAnnotation(defn.ScalaStaticAnnot)) {
102-
self.name.asTermName.getterName
103-
} else self.asTerm.name.fieldName
104-
101+
val thisName = self.name.asTermName
102+
val fieldName =
103+
if (self.hasAnnotation(defn.ScalaStaticAnnot)) thisName.getterName
104+
else thisName.fieldName
105105
self.owner.info.decl(fieldName).suchThat(!_.is(Method)).symbol
106106
}
107107

0 commit comments

Comments
 (0)