File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
src/dotty/tools/dotc/core Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -352,10 +352,11 @@ trait TypeOps { this: Context => // TODO: Make standalone object.
352
352
// println(i"instantiating ${bounds.hi} with $argTypes")
353
353
// println(i" = ${instantiate(bounds.hi, argTypes)}")
354
354
val hiBound = instantiate(bounds.hi, argTypes.mapConserve(_.bounds.hi))
355
+ val loBound = instantiate(bounds.lo, argTypes.mapConserve(_.bounds.lo))
355
356
// Note that argTypes can contain a TypeBounds type for arguments that are
356
357
// not fully determined. In that case we need to check against the hi bound of the argument.
357
358
if (! (lo <:< hiBound)) violations += ((arg, " upper" , hiBound))
358
- if (! (bounds.lo <:< hi)) violations += ((arg, " lower" , bounds.lo))
359
+ if (! (loBound <:< hi)) violations += ((arg, " lower" , bounds.lo))
359
360
}
360
361
arg.tpe match {
361
362
case TypeBounds (lo, hi) => checkOverlapsBounds(lo, hi)
Original file line number Diff line number Diff line change
1
+ class X
2
+ class A {
3
+ def foo [T1 , T2 >: T1 ]: Unit = {}
4
+
5
+ def test = {
6
+ foo[X , X ]
7
+ }
8
+ }
You can’t perform that action at this time.
0 commit comments