File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
compiler/src/dotty/tools/dotc/cc Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -1303,9 +1303,15 @@ object CaptureSet:
1303
1303
ref1.captureSetOfInfo.map(ReadOnlyMap ())
1304
1304
case _ =>
1305
1305
if ref.isMaxCapability then ref.singletonCaptureSet
1306
- else ofType(ref.underlying, followResult = true ) // TODO: why followResult = true?
1307
-
1308
- /** Capture set of a type */
1306
+ else ofType(ref.underlying, followResult = false )
1307
+
1308
+ /** Capture set of a type
1309
+ * @param followResult If true, also include capture sets of function results.
1310
+ * This mode is currently not used. It could be interesting
1311
+ * when we change the system so that the capture set of a function
1312
+ * is the union of the capture sets if its span.
1313
+ * In this case we should use `followResult = true` in the call in ofInfo above.
1314
+ */
1309
1315
def ofType (tp : Type , followResult : Boolean )(using Context ): CaptureSet =
1310
1316
def recur (tp : Type ): CaptureSet = trace(i " ofType $tp, ${tp.getClass} $followResult" , show = true ):
1311
1317
tp.dealiasKeepAnnots match
You can’t perform that action at this time.
0 commit comments