diff options
author | Martin Odersky <odersky@gmail.com> | 2016-10-01 21:50:22 +0200 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2016-10-11 19:21:02 +0200 |
commit | 14551e23d2de2db24864560c0b058306d1c78832 (patch) | |
tree | f7acedf1e18ed9bb3665a9be095c87b023209bdd /src/dotty/tools/dotc/core/OrderingConstraint.scala | |
parent | d47f3280a7d46fa5e65ebfc986ed04b7b739aae2 (diff) | |
download | dotty-14551e23d2de2db24864560c0b058306d1c78832.tar.gz dotty-14551e23d2de2db24864560c0b058306d1c78832.tar.bz2 dotty-14551e23d2de2db24864560c0b058306d1c78832.zip |
Refine mergeEntries
If entries are type variables, we have to check their
instances for equality.
This came up onder the new or handling scheme.
Diffstat (limited to 'src/dotty/tools/dotc/core/OrderingConstraint.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/OrderingConstraint.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/OrderingConstraint.scala b/src/dotty/tools/dotc/core/OrderingConstraint.scala index 458f8b82f..68c7655ef 100644 --- a/src/dotty/tools/dotc/core/OrderingConstraint.scala +++ b/src/dotty/tools/dotc/core/OrderingConstraint.scala @@ -521,6 +521,11 @@ class OrderingConstraint(private val boundsMap: ParamBounds, case _ if e1 contains e2 => e2 case _ => mergeError } + case tv1: TypeVar => + e2 match { + case tv2: TypeVar if tv1.instanceOpt eq tv2.instanceOpt => e1 + case _ => mergeError + } case _ if e1 eq e2 => e1 case _ => mergeError } |