aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty/tools/dotc/core')
-rw-r--r--src/dotty/tools/dotc/core/TypeOps.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/TypeOps.scala b/src/dotty/tools/dotc/core/TypeOps.scala
index 2b6ea49e8..1adabbd2d 100644
--- a/src/dotty/tools/dotc/core/TypeOps.scala
+++ b/src/dotty/tools/dotc/core/TypeOps.scala
@@ -352,10 +352,11 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
//println(i"instantiating ${bounds.hi} with $argTypes")
//println(i" = ${instantiate(bounds.hi, argTypes)}")
val hiBound = instantiate(bounds.hi, argTypes.mapConserve(_.bounds.hi))
+ val loBound = instantiate(bounds.lo, argTypes.mapConserve(_.bounds.lo))
// Note that argTypes can contain a TypeBounds type for arguments that are
// not fully determined. In that case we need to check against the hi bound of the argument.
if (!(lo <:< hiBound)) violations += ((arg, "upper", hiBound))
- if (!(bounds.lo <:< hi)) violations += ((arg, "lower", bounds.lo))
+ if (!(loBound <:< hi)) violations += ((arg, "lower", bounds.lo))
}
arg.tpe match {
case TypeBounds(lo, hi) => checkOverlapsBounds(lo, hi)