aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/dotty/tools/dotc/core/Types.scala6
-rw-r--r--tests/new/t1056.scala (renamed from tests/untried/pos/t1056.scala)0
2 files changed, 4 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index 9b5e02186..b6b17534e 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -1774,7 +1774,7 @@ object Types {
// upper bound is not a singleton type, widen the instance.
if (fromBelow && isSingleton(inst) && !isSingleton(upperBound))
inst = inst.widen
-
+
inst = inst.simplified
// 2. If instance is from below and is a fully-defined union type, yet upper bound
@@ -1782,7 +1782,7 @@ object Types {
// of all common base types.
if (fromBelow && isOrType(inst) && isFullyDefined(inst) && !isOrType(upperBound))
inst = inst.approximateUnion
-
+
instantiateWith(inst)
}
@@ -2094,6 +2094,8 @@ object Types {
zeroParamClass(tp.underlying)
case tp: RefinedType =>
zeroParamClass(tp.underlying)
+ case tp: TypeBounds =>
+ zeroParamClass(tp.underlying)
case tp: TypeVar =>
zeroParamClass(tp.underlying)
case _ =>
diff --git a/tests/untried/pos/t1056.scala b/tests/new/t1056.scala
index 68f1ff273..68f1ff273 100644
--- a/tests/untried/pos/t1056.scala
+++ b/tests/new/t1056.scala