We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0642c4 commit 5af5189Copy full SHA for 5af5189
compiler/src/dotty/tools/dotc/core/Types.scala
@@ -4019,7 +4019,16 @@ object Types {
4019
else pre match {
4020
case Range(preLo, preHi) =>
4021
val forwarded =
4022
- if (tp.symbol.is(ClassTypeParam)) tp.argForParam(preHi)
+ if (tp.symbol.is(ClassTypeParam)) {
4023
+ tp.argForParam(preHi) match {
4024
+ case arg: TypeArgRef =>
4025
+ arg.underlying match {
4026
+ case TypeBounds(lo, hi) => range(atVariance(-variance)(reapply(lo)), reapply(hi))
4027
+ case arg => reapply(arg)
4028
+ }
4029
4030
4031
4032
else tryWiden(tp, preHi)
4033
forwarded.orElse(
4034
range(super.derivedSelect(tp, preLo), super.derivedSelect(tp, preHi)))
0 commit comments