Skip to content

Commit 0cf2f20

Browse files
committed
rename cs1 to leaked for better readability
1 parent 7deb2b0 commit 0cf2f20

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

compiler/src/dotty/tools/dotc/cc/CheckCaptures.scala

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -693,29 +693,29 @@ class CheckCaptures extends Recheck, SymTransformer:
693693

694694
val (parent1, cs1) = parent match {
695695
case actual @ AppliedType(tycon, args) if defn.isNonRefinedFunction(actual) =>
696-
val (parent1, cs1) = adaptFun(parent, args.init, args.last, expected, covariant, insertBox,
696+
val (parent1, leaked) = adaptFun(parent, args.init, args.last, expected, covariant, insertBox,
697697
(aargs1, ares1) => actual.derivedAppliedType(tycon, aargs1 :+ ares1))
698-
(parent1, cs1 ++ cs)
698+
(parent1, leaked ++ cs)
699699
case actual @ RefinedType(_, _, rinfo: MethodType) if defn.isFunctionType(actual) =>
700700
// TODO Find a way to combine handling of generic and dependent function types (here and elsewhere)
701-
val (parent1, cs1) = adaptFun(parent, rinfo.paramInfos, rinfo.resType, expected, covariant, insertBox,
701+
val (parent1, leaked) = adaptFun(parent, rinfo.paramInfos, rinfo.resType, expected, covariant, insertBox,
702702
(aargs1, ares1) =>
703703
rinfo.derivedLambdaType(paramInfos = aargs1, resType = ares1)
704704
.toFunctionType(isJava = false, alwaysDependent = true))
705-
(parent1, cs1 ++ cs)
705+
(parent1, leaked ++ cs)
706706
case actual: MethodType =>
707-
val (parent1, cs1) = adaptFun(parent, actual.paramInfos, actual.resType, expected, covariant, insertBox,
707+
val (parent1, leaked) = adaptFun(parent, actual.paramInfos, actual.resType, expected, covariant, insertBox,
708708
(aargs1, ares1) =>
709709
actual.derivedLambdaType(paramInfos = aargs1, resType = ares1))
710-
(parent1, cs1 ++ cs)
710+
(parent1, leaked ++ cs)
711711
case actual @ RefinedType(p, nme, rinfo: PolyType) if defn.isFunctionOrPolyType(actual) =>
712-
val (parent1, cs1) = adaptTypeFun(parent, rinfo.resType, expected, covariant, insertBox,
712+
val (parent1, leaked) = adaptTypeFun(parent, rinfo.resType, expected, covariant, insertBox,
713713
ares1 =>
714714
val rinfo1 = rinfo.derivedLambdaType(rinfo.paramNames, rinfo.paramInfos, ares1)
715715
val actual1 = actual.derivedRefinedType(p, nme, rinfo1)
716716
actual1
717717
)
718-
(parent1, cs1 ++ cs)
718+
(parent1, leaked ++ cs)
719719
case _ =>
720720
(parent, cs)
721721
}

0 commit comments

Comments
 (0)