Skip to content

Commit 04dba38

Browse files
committed
Widen non-trackable singleton types before computing their dcs
1 parent c8d418a commit 04dba38

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ object CaptureSet:
10731073
case parent: SingletonCaptureRef if parent.isTrackableRef =>
10741074
tp.singletonCaptureSet
10751075
case _ =>
1076-
CaptureSet.ofTypeDeeply(parent)
1076+
CaptureSet.ofTypeDeeply(parent.widen)
10771077
case tpd @ defn.RefinedFunctionOf(rinfo: MethodType) if followResult =>
10781078
ofType(tpd.parent, followResult = false) // pick up capture set from parent type
10791079
++ (recur(rinfo.resType) // add capture set of result

0 commit comments

Comments
 (0)