From ebc316272deb2e2c3cd00659af453d5ac6a9a6ee Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 8 Mar 2017 14:01:29 +0100 Subject: 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. --- compiler/src/dotty/tools/dotc/core/TypeOps.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler') 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 => -- cgit v1.2.3