diff options
author | Martin Odersky <odersky@gmail.com> | 2017-03-08 14:01:29 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2017-03-08 14:01:40 +0100 |
commit | ebc316272deb2e2c3cd00659af453d5ac6a9a6ee (patch) | |
tree | 348b5b601a530dba15595bc66817ddec39d31a5c /compiler/src/dotty/tools/dotc/core/TypeOps.scala | |
parent | 3c4d29eabaa71c30ccc2c7b62517d771d6f9d8f5 (diff) | |
download | dotty-ebc316272deb2e2c3cd00659af453d5ac6a9a6ee.tar.gz dotty-ebc316272deb2e2c3cd00659af453d5ac6a9a6ee.tar.bz2 dotty-ebc316272deb2e2c3cd00659af453d5ac6a9a6ee.zip |
Fix #2064: Avoid illegal types in OrDominator
Need to skip type bounds in `underlying` chain, since
TypeBounds is not a legal operand type for OrType.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/core/TypeOps.scala')
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/TypeOps.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/core/TypeOps.scala b/compiler/src/dotty/tools/dotc/core/TypeOps.scala index 6c40794e3..6e9e1f2e5 100644 --- a/compiler/src/dotty/tools/dotc/core/TypeOps.scala +++ b/compiler/src/dotty/tools/dotc/core/TypeOps.scala @@ -239,7 +239,7 @@ trait TypeOps { this: Context => // TODO: Make standalone object. case tp1: RecType => tp1.rebind(approximateOr(tp1.parent, tp2)) case tp1: TypeProxy if !isClassRef(tp1) => - orDominator(tp1.superType | tp2) + orDominator(tp1.superType.bounds.hi | tp2) case _ => tp2 match { case tp2: RecType => |