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 @@ -228,12 +228,12 @@ extension (tp: Type)
228
228
* in the type, as computed by `CaptureSet.ofTypeDeeply`.
229
229
*/
230
230
def deepCaptureSet (using Context ): CaptureSet =
231
- val dcs = CaptureSet .ofTypeDeeply(tp)
232
- if dcs.isAlwaysEmpty then dcs
231
+ val dcs = CaptureSet .ofTypeDeeply(tp.widen.stripCapturing )
232
+ if dcs.isAlwaysEmpty then tp.captureSet
233
233
else tp match
234
234
case tp @ ReachCapability (_) => tp.singletonCaptureSet
235
- case tp : SingletonCaptureRef => tp.reach.singletonCaptureSet
236
- case _ => dcs
235
+ case tp : SingletonCaptureRef if tp.isTrackableRef => tp.reach.singletonCaptureSet
236
+ case _ => tp.captureSet ++ dcs
237
237
238
238
/** A type capturing `ref` */
239
239
def capturing (ref : CaptureRef )(using Context ): Type =
You can’t perform that action at this time.
0 commit comments