@@ -43,11 +43,11 @@ class SuperAccessors(thisTransformer: DenotTransformer) {
4343 * These are value class methods, which will become extension methods.
4444 * (By-name arguments used to be included also, but these
4545 * don't get a new class anymore, they are just wrapped in a new method).
46- *
46+ *
4747 * These regions will have to be treated specially for the purpose
4848 * of adding accessors. For instance, super calls from these regions
4949 * always have to go through an accessor.
50- *
50+ *
5151 * The `invalidOwner` field, if different from NoSymbol,
5252 * contains the symbol that is not a valid owner.
5353 */
@@ -59,10 +59,10 @@ class SuperAccessors(thisTransformer: DenotTransformer) {
5959 try trans
6060 finally invalidEnclClass = saved
6161 }
62-
63- private def validCurrentClass (implicit ctx : Context ): Boolean =
62+
63+ private def validCurrentClass (implicit ctx : Context ): Boolean =
6464 ctx.owner.enclosingClass != invalidEnclClass
65-
65+
6666 /** List buffers for new accessor definitions, indexed by class */
6767 private val accDefs = mutable.Map [Symbol , mutable.ListBuffer [Tree ]]()
6868
@@ -140,7 +140,7 @@ class SuperAccessors(thisTransformer: DenotTransformer) {
140140 (sym eq Any_## )
141141 }
142142
143- /** Replace `sel` (or `sel[targs]` if `targs` is nonempty) with a protected accessor
143+ /** Replace `sel` (or `sel[targs]` if `targs` is nonempty) with a protected accessor
144144 * call, if necessary.
145145 */
146146 private def ensureProtectedAccessOK (sel : Select , targs : List [Tree ])(implicit ctx : Context ) = {
@@ -204,12 +204,12 @@ class SuperAccessors(thisTransformer: DenotTransformer) {
204204 ctx.debuglog(s " Replaced $sel with $res" )
205205 res
206206 }
207-
207+
208208 def isProtectedAccessor (tree : Tree )(implicit ctx : Context ): Boolean = tree match {
209209 case Apply (TypeApply (Select (_, name), _), qual :: Nil ) => name.isProtectedAccessorName
210210 case _ => false
211211 }
212-
212+
213213 /** Add a protected accessor, if needed, and return a tree that calls
214214 * the accessor and returns the same member. The result is already
215215 * typed.
@@ -225,8 +225,8 @@ class SuperAccessors(thisTransformer: DenotTransformer) {
225225
226226 // if the result type depends on the this type of an enclosing class, the accessor
227227 // has to take an object of exactly this type, otherwise it's more general
228- val receiverType =
229- if (isThisType(sym.info.finalResultType)) clazz.thisType
228+ val receiverType =
229+ if (isThisType(sym.info.finalResultType)) clazz.thisType
230230 else clazz.classInfo.selfType
231231 def accTypeOf (tpe : Type ): Type = tpe match {
232232 case tpe : PolyType =>
@@ -401,10 +401,10 @@ class SuperAccessors(thisTransformer: DenotTransformer) {
401401 val setter = protectedSetter(lhs)
402402 ctx.debuglog(" Replaced " + tree + " with " + setter)
403403 setter.appliedTo(qual, rhs)
404- }
405- else tree
404+ }
405+ else tree
406406 }
407-
407+
408408 /** Wrap template to template transform `op` with needed initialization and finalization */
409409 def wrapTemplate (tree : Template )(op : Template => Template )(implicit ctx : Context ) = {
410410 accDefs(currentClass) = new mutable.ListBuffer [Tree ]
@@ -417,7 +417,7 @@ class SuperAccessors(thisTransformer: DenotTransformer) {
417417 case vd : ValOrDefDef => vd.symbol.flags is ParamAccessor
418418 case _ => false
419419 }
420- cpy.Template (impl)(body = params ++ accessors ++ rest)
420+ cpy.Template (impl)(body = params ++ accessors ++ rest)
421421 }
422422 }
423423
0 commit comments