aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala6
1 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 _ =>