summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/backend/icode/TypeKinds.scala
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@epfl.ch>2010-02-10 09:03:13 +0000
committerLukas Rytz <lukas.rytz@epfl.ch>2010-02-10 09:03:13 +0000
commitd4486b9e2e782575c201ba1baa0288371c7e9356 (patch)
treefd115c4272d3ccaf2a5c74aa89c18b02b3cdb4b5 /src/compiler/scala/tools/nsc/backend/icode/TypeKinds.scala
parent5087792ddace9cc76d063d6cc9327eb41c73b52d (diff)
downloadscala-d4486b9e2e782575c201ba1baa0288371c7e9356.tar.gz
scala-d4486b9e2e782575c201ba1baa0288371c7e9356.tar.bz2
scala-d4486b9e2e782575c201ba1baa0288371c7e9356.zip
close #3003. no review, already done by dragos.
Diffstat (limited to 'src/compiler/scala/tools/nsc/backend/icode/TypeKinds.scala')
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/TypeKinds.scala8
1 files changed, 6 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 2c4a1c5b5f..d83659f477 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/TypeKinds.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/TypeKinds.scala
@@ -431,8 +431,12 @@ trait TypeKinds { self: ICodes =>
////////////////// Conversions //////////////////////////////
- /** Return the TypeKind of the given type */
- def toTypeKind(t: Type): TypeKind = t match {
+ /** Return the TypeKind of the given type
+ *
+ * Call to .normalize fixes #3003 (follow type aliases). Otherwise,
+ * arrayOrClassType below would return AnyRefReference.
+ */
+ def toTypeKind(t: Type): TypeKind = t.normalize match {
case ThisType(sym) =>
if (sym == ArrayClass)
AnyRefReference