diff options
author | Martin Odersky <odersky@gmail.com> | 2015-01-24 11:32:25 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-01-24 11:32:48 +0100 |
commit | cdce02dc1d9c957621165545848c1f7bc358bd6d (patch) | |
tree | e0da69048de6492dce185683eca161b0aeb14bda /src/dotty/tools/dotc/core/TypeComparer.scala | |
parent | 47238eb6c8bbc852d1ec1c55404694110f32120c (diff) | |
download | dotty-cdce02dc1d9c957621165545848c1f7bc358bd6d.tar.gz dotty-cdce02dc1d9c957621165545848c1f7bc358bd6d.tar.bz2 dotty-cdce02dc1d9c957621165545848c1f7bc358bd6d.zip |
Fixes suggested by reviews from @smarter.
Also, added tests trhat work now.
Diffstat (limited to 'src/dotty/tools/dotc/core/TypeComparer.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/TypeComparer.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/TypeComparer.scala b/src/dotty/tools/dotc/core/TypeComparer.scala index 1de2d7e98..db6e504d5 100644 --- a/src/dotty/tools/dotc/core/TypeComparer.scala +++ b/src/dotty/tools/dotc/core/TypeComparer.scala @@ -88,7 +88,7 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling wi assert(isSatisfiable, constraint.show) } - def isSubType(tp1: Type, tp2: Type): Boolean = ctx.traceIndented(s"isSubType ${traceInfo(tp1, tp2)}", subtyping) /*<|<*/ { + protected def isSubType(tp1: Type, tp2: Type): Boolean = ctx.traceIndented(s"isSubType ${traceInfo(tp1, tp2)}", subtyping) /*<|<*/ { if (tp2 eq NoType) false else if (tp1 eq tp2) true else { @@ -179,7 +179,7 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling wi else (tp1.name eq tp2.name) && isSameType(tp1.prefix, tp2.prefix) && - (tp1.signature == tp1.signature) && + (tp1.signature == tp2.signature) && !tp1.isInstanceOf[WithFixedSym] && !tp2.isInstanceOf[WithFixedSym] ) || |