We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4d317f commit 9b91a2cCopy full SHA for 9b91a2c
compiler/src/dotty/tools/dotc/transform/SymUtils.scala
@@ -98,10 +98,10 @@ class SymUtils(val self: Symbol) extends AnyVal {
98
else accessorNamed(self.asTerm.name.setterName)
99
100
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
-
+ val thisName = self.name.asTermName
+ val fieldName =
+ if (self.hasAnnotation(defn.ScalaStaticAnnot)) thisName.getterName
+ else thisName.fieldName
105
self.owner.info.decl(fieldName).suchThat(!_.is(Method)).symbol
106
}
107
0 commit comments