Skip to content

Commit 001901d

Browse files
committed
Capture stripping for capture variables
Given a capture set variable `C`, its `stripCapturing` should be just `CapSet`.
1 parent 1f0c576 commit 001901d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,8 @@ extension (tp: Type)
359359
parent.stripCapturing
360360
case atd @ AnnotatedType(parent, annot) =>
361361
atd.derivedAnnotatedType(parent.stripCapturing, annot)
362+
case tp if tp.derivesFrom(defn.Caps_CapSet) =>
363+
defn.Caps_CapSet.typeRef
362364
case _ =>
363365
tp
364366

0 commit comments

Comments
 (0)