diff options
author | Martin Odersky <odersky@gmail.com> | 2013-02-06 22:37:35 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-02-06 22:37:35 +0100 |
commit | d7e283216a4d6a53aa3f0c837f3412165e5bcba6 (patch) | |
tree | bb00ae2d72a79fb4a114dc20cb451a3e7e96dc9e /src/dotty/tools/dotc/core/Types.scala | |
parent | 401fae7d1ccd6bcd523dccd28f2e29090eaec1ef (diff) | |
download | dotty-d7e283216a4d6a53aa3f0c837f3412165e5bcba6.tar.gz dotty-d7e283216a4d6a53aa3f0c837f3412165e5bcba6.tar.bz2 dotty-d7e283216a4d6a53aa3f0c837f3412165e5bcba6.zip |
Disentangled denotation types from their symbols, based on info instead.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index e17572cde..c04ccd60c 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -589,6 +589,9 @@ object Types { */ trait SingletonType extends TypeProxy + /** A marker trait for types that apply only to type symbols */ + trait TypeType extends Type + // --- NamedTypes ------------------------------------------------------------------ /** A NamedType of the form Prefix # name @@ -964,7 +967,7 @@ object Types { // ------ ClassInfo, Type Bounds ------------------------------------------------------------ - abstract case class ClassInfo(prefix: Type, classd: ClassDenotation) extends CachedGroundType { + abstract case class ClassInfo(prefix: Type, classd: ClassDenotation) extends CachedGroundType with TypeType { /* def typeTemplate(implicit ctx: Context): Type = classd.typeTemplate asSeenFrom (prefix, classd.symbol) @@ -991,7 +994,7 @@ object Types { unique(new CachedClassInfo(prefix, classd)) } - abstract case class TypeBounds(lo: Type, hi: Type) extends CachedProxyType { + abstract case class TypeBounds(lo: Type, hi: Type) extends CachedProxyType with TypeType { override def underlying(implicit ctx: Context): Type = hi def derivedTypeBounds(lo1: Type, hi1: Type)(implicit ctx: Context) = if ((lo1 eq lo) && (hi1 eq hi)) this |