diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2010-09-22 20:38:55 +0000 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2010-09-22 20:38:55 +0000 |
commit | 3e70e56427e9b4eed821863e233bc71a907464b5 (patch) | |
tree | 16894ed2e2e40ab0225981b0aa7d5c2c421bb2df | |
parent | c8dec9898113a299ceb6201b84a451fc22813ca9 (diff) | |
download | scala-3e70e56427e9b4eed821863e233bc71a907464b5.tar.gz scala-3e70e56427e9b4eed821863e233bc71a907464b5.tar.bz2 scala-3e70e56427e9b4eed821863e233bc71a907464b5.zip |
removed deskolemize hack for tcpoly.
initialize the tree's symbol in typedTypeDef to make sure its info is
loaded.
review by odersky
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/UnCurry.scala | 1 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Namers.scala | 6 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/UnCurry.scala b/src/compiler/scala/tools/nsc/transform/UnCurry.scala index f5d6f63b12..45e7410bc5 100644 --- a/src/compiler/scala/tools/nsc/transform/UnCurry.scala +++ b/src/compiler/scala/tools/nsc/transform/UnCurry.scala @@ -55,6 +55,7 @@ abstract class UnCurry extends InfoTransform with TypingTransformers { private val uncurry: TypeMap = new TypeMap { def apply(tp0: Type): Type = { + // tp0.typeSymbolDirect.initialize val tp = expandAlias(tp0) tp match { case MethodType(params, MethodType(params1, restpe)) => diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index 262a760958..533793dbc4 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -1218,8 +1218,8 @@ trait Namers { self: Analyzer => ErrorType } result match { - case PolyType(tparams, restpe) - if (!tparams.isEmpty && tparams.head.owner.isTerm || + case PolyType(tparams, restpe) if (tparams.nonEmpty && tparams.head.owner.isTerm) => + // || // Adriaan: The added condition below is quite a hack. It seems that HK type parameters is relying // on a pass that forces all infos in the type to get everything right. // The problem is that the same pass causes cyclic reference errors in @@ -1230,7 +1230,7 @@ trait Namers { self: Analyzer => // Maybe it's not a hack, then we need to document it better. But ideally, we should find // a way to deal with HK types that's not dependent on accidental side // effects like this. - tparams.exists(!_.typeParams.isEmpty)) => + // tparams.exists(!_.typeParams.isEmpty)) => new DeSkolemizeMap(tparams) mapOver result case _ => // println("not skolemizing "+result+" in "+context.owner) diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 52ea62e656..082d9afcfd 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -1830,6 +1830,7 @@ trait Typers { self: Analyzer => // call typedTypeDef instead // a TypeDef with type parameters must always be type checked in a new scope private def typedTypeDef0(tdef: TypeDef): TypeDef = { + tdef.symbol.initialize reenterTypeParams(tdef.tparams) val tparams1 = tdef.tparams mapConserve {typedTypeDef(_)} val typedMods = removeAnnotations(tdef.mods) |