diff options
author | Martin Odersky <odersky@gmail.com> | 2013-02-18 09:41:11 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-02-18 09:41:11 +0100 |
commit | 2b4a19e80a643dfdf8eea5fa40811f76edb27be3 (patch) | |
tree | 564455c04aba5c2da721a188e85163e5240957c5 /src/dotty/tools/dotc/core/Types.scala | |
parent | 6bd453e8f3b50e7c48b6969bd4aaf6638b0455f8 (diff) | |
download | dotty-2b4a19e80a643dfdf8eea5fa40811f76edb27be3.tar.gz dotty-2b4a19e80a643dfdf8eea5fa40811f76edb27be3.tar.bz2 dotty-2b4a19e80a643dfdf8eea5fa40811f76edb27be3.zip |
Fleshed out TypeTreeGen.
All base cases now supported. Still missing: Intelligent treatment of positions.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 26d6fa312..c9b8afb90 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -12,7 +12,7 @@ import Contexts._ import Annotations._ import SymDenotations._ import Denotations._ -import Periods._ +import Periods._, Trees._ import scala.util.hashing.{ MurmurHash3 => hashing } import collection.mutable @@ -460,7 +460,8 @@ object Types { if (args.isEmpty) this else recur(this, typeParams, args) } - final def appliedTo(args: Type*)(implicit ctx: Context): Type = appliedTo(args.toList) + final def appliedTo(arg: Type)(implicit ctx: Context): Type = appliedTo(arg :: Nil) + final def appliedTo(arg1: Type, arg2: Type)(implicit ctx: Context): Type = appliedTo(arg1 :: arg2 :: Nil) final def objToAny(implicit ctx: Context) = if (typeSymbol == defn.ObjectClass && !ctx.phase.erasedTypes) defn.AnyType else this @@ -831,7 +832,7 @@ object Types { unique(new CachedRefinedType(parent, name, infof)) def apply(parent: Type, name: Name, info: Type)(implicit ctx: Context): RefinedType = - apply(parent, name, Function const info: (RefinedType => Type)) + apply(parent, name, scala.Function const info: (RefinedType => Type)) } // --- AndType/OrType --------------------------------------------------------------- @@ -1094,7 +1095,7 @@ object Types { } } - // ----- AnnotatedTypes ----------------------------------------------------------- + // ----- Annotated and Import types ----------------------------------------------- case class AnnotatedType(annots: List[Annotation], tpe: Type) extends UncachedProxyType { override def underlying(implicit ctx: Context): Type = tpe @@ -1109,6 +1110,8 @@ object Types { else AnnotatedType(annots, underlying) } + case class ImportType(expr: TypedTree) extends UncachedGroundType + // Special type objects ------------------------------------------------------------ case object NoType extends UncachedGroundType { |