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 9dfdeec commit d92e3e6Copy full SHA for d92e3e6
compiler/src/dotty/tools/dotc/core/Types.scala
@@ -3833,12 +3833,14 @@ object Types {
3833
3834
case tp: AppliedType =>
3835
def mapArgs(args: List[Type], tparams: List[ParamInfo]): List[Type] = args match {
3836
- case arg :: args1 =>
+ case arg :: otherArgs =>
3837
val arg1 = arg match {
3838
case arg: TypeBounds => this(arg)
3839
case arg => atVariance(variance * tparams.head.paramVariance)(this(arg))
3840
}
3841
- arg1 :: mapArgs(args1, tparams.tail)
+ val otherArgs1 = mapArgs(otherArgs, tparams.tail)
3842
+ if ((arg1 eq arg) && (otherArgs1 eq otherArgs)) args
3843
+ else arg1 :: otherArgs1
3844
case nil =>
3845
nil
3846
0 commit comments