diff options
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Contexts.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index 82c12f7e4b..383d22a447 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -102,7 +102,7 @@ trait Contexts requires Analyzer { tree match { case Template(_, _) | PackageDef(_, _) => c.enclClass = c; - c.prefix = skolemizedThisType(this.tree, this.prefix, c.owner) + c.prefix = c.owner.thisType c.inConstructorSuffix = false case _ => c.enclClass = this.enclClass @@ -178,22 +178,6 @@ trait Contexts requires Analyzer { c } - def skolemizedThisType(encl: Tree, pre: Type, clazz: Symbol): Type = if (settings.Xgadt.value) { - encl match { - case ClassDef(_, _, tparamdefs, _, _) => - System.out.println("sktt " + clazz) - if (!tparamdefs.isEmpty || pre.isInstanceOf[SingleType]) { - val tparams = clazz.unsafeTypeParams - val tskolems = tparamdefs map (.symbol) - System.out.println("sktt2 " + tparams + " " + tskolems) - val self = clazz.newThisSkolem setInfo clazz.typeOfThis.substSym(tparams, tskolems) - singleType(pre, self) - } else clazz.thisType - case _ => - clazz.thisType - } - } else clazz.thisType - def error(pos: int, msg: String): unit = if (reportGeneralErrors) unit.error(pos, if (checking) "**** ERROR DURING INTERNAL CHECKING ****\n" + msg else msg) |