summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2007-07-20 12:27:22 +0000
committerAdriaan Moors <adriaan.moors@epfl.ch>2007-07-20 12:27:22 +0000
commitf3c134a70b0c0094eb0193c85987ee13a68b5a49 (patch)
tree5a805f285dfc9ceb05b7e5adcacda63ba8351a8f /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parentbd9874055fa2fbd2d848e59973c2b6b87f0e1fac (diff)
downloadscala-f3c134a70b0c0094eb0193c85987ee13a68b5a49.tar.gz
scala-f3c134a70b0c0094eb0193c85987ee13a68b5a49.tar.bz2
scala-f3c134a70b0c0094eb0193c85987ee13a68b5a49.zip
a better fix than in r12370: delaying normaliza...
a better fix than in r12370: delaying normalization of T in classOf[T] until it is actually necessary (in toTypeKind)
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 6370eb244d..5799e3f494 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -2070,7 +2070,8 @@ trait Typers { self: Analyzer =>
if (fun.symbol == Predef_classOf) {
if (!targs.head.typeSymbol.isClass || targs.head.typeSymbol.isRefinementClass)
error(args.head.pos, "class type required");
- Literal(Constant(targs.head.normalize)) setPos tree.pos setType ClassClass.tpe
+ Literal(Constant(targs.head)) setPos tree.pos setType ClassClass.tpe
+ // @M: targs.head.normalize is not necessary --> toTypeKind eventually normalizes the type
} else {
val resultpe0 = restpe.instantiateTypeParams(tparams, targs)
//@M TODO -- probably ok