Skip to content

Commit 4a2cc96

Browse files
Update 0414-region-based-isolation.md
Adjusting the code to match the scenario described in the example.
1 parent 80c3616 commit 4a2cc96

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

proposals/0414-region-based-isolation.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,10 @@ Now lets apply these rules to some specific examples in Swift code:
321321
```swift
322322
func captureInClosure() {
323323
let x = NonSendable()
324-
// Regions: [(x)]
325-
let closure = { print(x) }
326-
// Regions: [(x, closure)]
324+
let y = NonSendable()
325+
// Regions: [(x), (y)]
326+
let closure = { print(x); print(y) }
327+
// Regions: [(x, y, closure)]
327328
}
328329
```
329330

0 commit comments

Comments
 (0)