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)
229229 * in the type, as computed by `CaptureSet.ofTypeDeeply`.
230230 */
231231 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
234234 else tp match
235235 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
238238
239239 /** A type capturing `ref` */
240240 def capturing (ref : CaptureRef )(using Context ): Type =
You can’t perform that action at this time.
0 commit comments