aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-01-10 20:54:35 +0100
committerMartin Odersky <odersky@gmail.com>2014-01-10 20:54:35 +0100
commit937dbdcf1d15548a6870c18514441d7b4e0bf234 (patch)
tree8ceea7f54c759e72ce56281bb2393625862e8a44 /src/dotty/tools/dotc/core/Types.scala
parent68d7ea1534f6145d59506138d6af169cc27f9aa3 (diff)
downloaddotty-937dbdcf1d15548a6870c18514441d7b4e0bf234.tar.gz
dotty-937dbdcf1d15548a6870c18514441d7b4e0bf234.tar.bz2
dotty-937dbdcf1d15548a6870c18514441d7b4e0bf234.zip
Type comparison tweak.
We assume that two types A.this.C and B.this.C where C is the same class symbol, yet A and B are unrelated, are equal (i.e. mutually subtypes of each other). Such types comes up in situations where the self type of a type is different from the enclosing class.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index e1e3e9c97..36513a2bc 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -1223,6 +1223,7 @@ object Types {
final class CachedTermRef(prefix: Type, name: TermName) extends TermRef(prefix, name) {
assert(prefix ne NoPrefix)
}
+
final class CachedTypeRef(prefix: Type, name: TypeName) extends TypeRef(prefix, name) {
assert(prefix ne NoPrefix)
}