summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Contexts.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2006-08-14 16:08:35 +0000
committerMartin Odersky <odersky@gmail.com>2006-08-14 16:08:35 +0000
commitc840d9f58c3d3dd9dbb5581df86985d6600fa09a (patch)
treedd22188d2001ec5524a94cf2c7ac137a80826b61 /src/compiler/scala/tools/nsc/typechecker/Contexts.scala
parenta959d0cd1054396113417ae0fc29117601811d6f (diff)
downloadscala-c840d9f58c3d3dd9dbb5581df86985d6600fa09a.tar.gz
scala-c840d9f58c3d3dd9dbb5581df86985d6600fa09a.tar.bz2
scala-c840d9f58c3d3dd9dbb5581df86985d6600fa09a.zip
eliminated -Xgadt option.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Contexts.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Contexts.scala18
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)