diff options
author | Paul Phillips <paulp@improving.org> | 2010-11-04 00:07:36 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-11-04 00:07:36 +0000 |
commit | 379af580e2c8cf0ce5309fc0b31702f79e415abe (patch) | |
tree | cf741eb0d27624d6130bb5bc7f403ec7fb05af1d /src/compiler/scala/tools/nsc/backend/icode/TypeKinds.scala | |
parent | de012b3a6d04f1e7a9fd6fecd403e0492f6ad7c1 (diff) | |
download | scala-379af580e2c8cf0ce5309fc0b31702f79e415abe.tar.gz scala-379af580e2c8cf0ce5309fc0b31702f79e415abe.tar.bz2 scala-379af580e2c8cf0ce5309fc0b31702f79e415abe.zip |
Determined that half a dozen ways of checking f...
Determined that half a dozen ways of checking for varargs and
by-name-ness in param lists exceeded the legal limit. Also assessed that
names which are only used as type names would be a lot easier to deal
with if we created them as type names up front. Performed the changes
implied by the preceding along with a partial cleanup on TreeInfo which
one can see hasn't had a good look in a long time. (And still hasn't.)
No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/backend/icode/TypeKinds.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/icode/TypeKinds.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/icode/TypeKinds.scala b/src/compiler/scala/tools/nsc/backend/icode/TypeKinds.scala index bf5a364515..5e44d519cf 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/TypeKinds.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/TypeKinds.scala @@ -25,7 +25,7 @@ package icode trait TypeKinds { self: ICodes => import global._ - import definitions.{ ArrayClass, AnyRefClass, ObjectClass, NullClass, NothingClass } + import definitions.{ ArrayClass, AnyRefClass, ObjectClass, NullClass, NothingClass, arrayType } import icodes.checkerDebug /** A map from scala primitive Types to ICode TypeKinds */ @@ -56,9 +56,9 @@ trait TypeKinds { self: ICodes => def toType: Type = (reversePrimitiveMap get this) map (_.tpe) getOrElse { this match { - case REFERENCE(cls) => cls.tpe - case ARRAY(elem) => typeRef(ArrayClass.typeConstructor.prefix, ArrayClass, List(elem.toType)) - case _ => abort("Unknown type kind.") + case REFERENCE(cls) => cls.tpe + case ARRAY(elem) => arrayType(elem.toType) + case _ => abort("Unknown type kind.") } } def toTypeAt(ph: Phase): Type = atPhase(ph)(toType) |