summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/TypeKinds.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/icode/TypeKinds.scala b/src/compiler/scala/tools/nsc/backend/icode/TypeKinds.scala
index 5e552faddb..1bf5455a13 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/TypeKinds.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/TypeKinds.scala
@@ -380,7 +380,7 @@ trait TypeKinds { self: ICodes =>
/** Return the TypeKind of the given type */
- def toTypeKind(t: Type): TypeKind = t match {
+ def toTypeKind(t: Type): TypeKind = t.normalize match {
case ThisType(sym) => REFERENCE(sym)
case SingleType(pre, sym) =>
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