diff options
-rw-r--r-- | sources/scalac/transformer/LambdaLiftPhase.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sources/scalac/transformer/LambdaLiftPhase.java b/sources/scalac/transformer/LambdaLiftPhase.java index 92ac46cedb..3406fb2236 100644 --- a/sources/scalac/transformer/LambdaLiftPhase.java +++ b/sources/scalac/transformer/LambdaLiftPhase.java @@ -85,6 +85,15 @@ public class LambdaLiftPhase extends PhaseDescriptor implements Kinds, Modifiers public Type apply(Type tp) { switch (tp) { case TypeRef(Type pre, Symbol sym, Type[] targs): + if (sym.kind == CLASS) { + switch (pre) { + case ThisType(Symbol s): + if (s == Symbol.NONE) { + pre = sym.owner().enclClass().thisType(); + tp = Type.TypeRef(pre, sym, targs); + } + } + } switch (pre) { case ThisType(_): if (sym.kind == CLASS && |