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 2524788 commit e3c0aafCopy full SHA for e3c0aaf
compiler/src/dotty/tools/dotc/core/Types.scala
@@ -3845,7 +3845,7 @@ object Types {
3845
mapOverLambda
3846
3847
case tp @ TypeArgRef(prefix, _, _) =>
3848
- derivedTypeArgRef(tp, atVariance(0)(this(prefix)))
+ derivedTypeArgRef(tp, atVariance(variance max 0)(this(prefix)))
3849
3850
case tp @ SuperType(thistp, supertp) =>
3851
derivedSuperType(tp, this(thistp), this(supertp))
@@ -4247,7 +4247,7 @@ object Types {
4247
this(x, tp.info)
4248
4249
4250
- atVariance(0)(this(x, prefix))
+ atVariance(variance max 0)(this(x, prefix))
4251
4252
case SuperType(thistp, supertp) =>
4253
this(this(x, thistp), supertp)
0 commit comments