File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
compiler/src/dotty/tools/dotc/cc Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -229,12 +229,12 @@ extension (tp: Type)
229
229
* in the type, as computed by `CaptureSet.ofTypeDeeply`.
230
230
*/
231
231
def deepCaptureSet (using Context ): CaptureSet =
232
- val dcs = CaptureSet .ofTypeDeeply(tp)
233
- if dcs.isAlwaysEmpty then dcs
232
+ val dcs = CaptureSet .ofTypeDeeply(tp.widen.stripCapturing )
233
+ if dcs.isAlwaysEmpty then tp.captureSet
234
234
else tp match
235
235
case tp @ ReachCapability (_) => tp.singletonCaptureSet
236
- case tp : SingletonCaptureRef => tp.reach.singletonCaptureSet
237
- case _ => dcs
236
+ case tp : SingletonCaptureRef if tp.isTrackableRef => tp.reach.singletonCaptureSet
237
+ case _ => tp.captureSet ++ dcs
238
238
239
239
/** A type capturing `ref` */
240
240
def capturing (ref : CaptureRef )(using Context ): Type =
You can’t perform that action at this time.
0 commit comments