@@ -65,7 +65,7 @@ abstract class SuperAccessors extends transform.Transform with transform.TypingT
65
65
storeAccessorDefinition(clazz, DefDef (acc, EmptyTree ))
66
66
acc
67
67
}
68
-
68
+
69
69
atPos(sel.pos)(Select (gen.mkAttributedThis(clazz), superAcc) setType sel.tpe)
70
70
}
71
71
@@ -131,20 +131,20 @@ abstract class SuperAccessors extends transform.Transform with transform.TypingT
131
131
// we need an accessor to get to a super on an outer thing, but only if we can't call name more directly on
132
132
// a trait implementation class. So this complicated condition is leaving alone cases where we don't need to do
133
133
// anything special (i.e. we're getting a direct super class) or where a later transform will inject a call to
134
- // a trait implementation method directly.
134
+ // a trait implementation method directly.
135
135
//
136
- // SI-6536 has more discussion about how this works.
136
+ // SI-6536 has more discussion about how this works.
137
137
//
138
- // So, we're looking for items of the form clazz.super[mix].name (or clazz.super.name wich is seen as
138
+ // So, we're looking for items of the form clazz.super[mix].name (or clazz.super.name wich is seen as
139
139
// clazz.super[EMPTY].name with some limitations. First, name has to be a term rather than a type.
140
- // Then there are a couple of cases.
140
+ // Then there are a couple of cases.
141
141
def requiresAccessor = name.isTermName && (mix match {
142
142
// If mix is empty then we only need an accessor if clazz is a trait, it's not this current class,
143
- // or the validCurentOwner setting is false...which...ugh, is a mess.
144
- case tpnme.EMPTY => clazz.isTrait || clazz != currentClass || ! validCurrentOwner
143
+ // or the validCurentOwner setting is false...which...ugh, is a mess.
144
+ case tpnme.EMPTY => clazz.isTrait || clazz != currentClass || ! validCurrentOwner
145
145
// If the mix is set then if it refers to a class and the clazz part isn't the current class
146
146
// it's not just super[mix].name then we need to generate an accessor.
147
- case _ => clazz != currentClass && ! mixTpeIsTrait
147
+ case _ => clazz != currentClass && ! mixTpeIsTrait
148
148
})
149
149
150
150
if (requiresAccessor) ensureAccessor(sel)
@@ -232,7 +232,7 @@ abstract class SuperAccessors extends transform.Transform with transform.TypingT
232
232
parent.info.decls filterNot (x => x.isPrivate || x.hasLocalFlag) foreach { m2 =>
233
233
if (sym.name == m2.name && m2.isGetter && m2.accessed.isMutable) {
234
234
unit.warning(sel.pos,
235
- sym.accessString + " " + sym. fullLocationString + " shadows mutable " + m2.name
235
+ sym.fullLocationString + " shadows mutable " + m2.name
236
236
+ " inherited from " + m2.owner + " . Changes to " + m2.name + " will not be visible within "
237
237
+ sym.owner + " - you may want to give them distinct names."
238
238
)
@@ -263,7 +263,7 @@ abstract class SuperAccessors extends transform.Transform with transform.TypingT
263
263
// FIXME - this should be unified with needsProtectedAccessor, but some
264
264
// subtlety which presently eludes me is foiling my attempts.
265
265
val shouldEnsureAccessor = (
266
- currentClass.isTrait
266
+ currentClass.isTrait
267
267
&& sym.isProtected
268
268
&& sym.enclClass != currentClass
269
269
&& ! sym.owner.isTrait
0 commit comments