diff options
author | Martin Odersky <odersky@gmail.com> | 2013-10-10 18:38:41 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-10-10 18:38:41 +0200 |
commit | b4c0e4af5ef03384f24e370059724be7c1ca6fb3 (patch) | |
tree | 8079557288014aa1e5c9815e83189491dc9415e8 /src/dotty/tools/dotc/core/Types.scala | |
parent | 7ebb48127be6c02578596d0b9e627af250d11863 (diff) | |
download | dotty-b4c0e4af5ef03384f24e370059724be7c1ca6fb3.tar.gz dotty-b4c0e4af5ef03384f24e370059724be7c1ca6fb3.tar.bz2 dotty-b4c0e4af5ef03384f24e370059724be7c1ca6fb3.zip |
Fixed missing type comparisons for bound types.
Also, new method "explained" in TypeComparers.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index b5cd8c3ee..257128821 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -2058,9 +2058,11 @@ object Types { final class CachedTypeBounds(lo: Type, hi: Type) extends TypeBounds(lo, hi) final class CoTypeBounds(lo: Type, hi: Type) extends TypeBounds(lo, hi) { override def variance = 1 + override def toString = "Co" + super.toString } final class ContraTypeBounds(lo: Type, hi: Type) extends TypeBounds(lo, hi) { override def variance = -1 + override def toString = "Contra" + super.toString } object TypeBounds { @@ -2412,4 +2414,12 @@ object Types { // ----- Debug --------------------------------------------------------- var debugTrace = false + + val watchList = List[String]( + ) map (_.toTypeName) + + def isWatched(tp: Type) = tp match { + case TypeRef(_, name) => watchList contains name + case _ => false + } } |