diff options
author | Martin Odersky <odersky@gmail.com> | 2015-04-23 21:06:42 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-04-23 21:06:42 +0200 |
commit | 2b3591cec6a1d58f3346b6c8933ca0742f13c1cf (patch) | |
tree | f334787708775f72a8f4bdf10e384a89460414a8 /src/dotty/tools/dotc/transform/LambdaLift.scala | |
parent | 36c229ba8c3d44546b34446ca36c8f335a9c5f47 (diff) | |
download | dotty-2b3591cec6a1d58f3346b6c8933ca0742f13c1cf.tar.gz dotty-2b3591cec6a1d58f3346b6c8933ca0742f13c1cf.tar.bz2 dotty-2b3591cec6a1d58f3346b6c8933ca0742f13c1cf.zip |
Remove trailing whitespace
I have figured out how to make this the default in Eclipse, so hopefully
we won't see many repeats of this.
Diffstat (limited to 'src/dotty/tools/dotc/transform/LambdaLift.scala')
-rw-r--r-- | src/dotty/tools/dotc/transform/LambdaLift.scala | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/dotty/tools/dotc/transform/LambdaLift.scala b/src/dotty/tools/dotc/transform/LambdaLift.scala index 9b35d1d99..1a23d887c 100644 --- a/src/dotty/tools/dotc/transform/LambdaLift.scala +++ b/src/dotty/tools/dotc/transform/LambdaLift.scala @@ -107,18 +107,18 @@ class LambdaLift extends MiniPhase with IdentityDenotTransformer { thisTransform * in `enclosure` or there is an intermediate class properly containing `enclosure` * in which `sym` is also free. Also, update `liftedOwner` of `enclosure` so * that `enclosure` can access `sym`, or its proxy in an intermediate class. - * This means: - * + * This means: + * * 1. If there is an intermediate class in which `sym` is free, `enclosure` - * must be contained in that class (in order to access the `sym proxy stored + * must be contained in that class (in order to access the `sym proxy stored * in the class). - * + * * 2. If there is no intermediate class, `enclosure` must be contained * in the class enclosing `sym`. - * + * * Return the closest enclosing intermediate class between `enclosure` and * the owner of sym, or NoSymbol if none exists. - * + * * pre: sym.owner.isTerm, (enclosure.isMethod || enclosure.isClass) * * The idea of `markFree` is illustrated with an example: @@ -150,10 +150,10 @@ class LambdaLift extends MiniPhase with IdentityDenotTransformer { thisTransform else { ctx.log(i"mark free: ${sym.showLocated} with owner ${sym.maybeOwner} marked free in $enclosure") ctx.debuglog(i"$enclosure != ${sym.enclosure}") - val intermediate = + val intermediate = if (enclosure.is(PackageClass)) enclosure - else markFree(sym, enclosure.skipConstructor.enclosure) - // `enclosure` might be a constructor, in which case we want the enclosure + else markFree(sym, enclosure.skipConstructor.enclosure) + // `enclosure` might be a constructor, in which case we want the enclosure // of the enclosing class, so skipConstructor is needed here. if (intermediate.exists) { narrowLiftedOwner(enclosure, intermediate) @@ -394,12 +394,12 @@ class LambdaLift extends MiniPhase with IdentityDenotTransformer { thisTransform val sym = tree.symbol tree.tpe match { case tpe @ TermRef(prefix, _) => - if (prefix eq NoPrefix) + if (prefix eq NoPrefix) if (sym.enclosure != currentEnclosure && !sym.isStatic) (if (sym is Method) memberRef(sym) else proxyRef(sym)).withPos(tree.pos) else if (sym.owner.isClass) // sym was lifted out ref(sym).withPos(tree.pos) - else + else tree else if (!prefixIsElidable(tpe)) ref(tpe) else tree |