Skip to content

Commit a116397

Browse files
authored
Merge pull request #41635 from kavon/testcoverage-82452688
add coverage for <<error-type>> + Sendable diagnostic issue
2 parents 6d19bab + e8e27a7 commit a116397

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/Concurrency/sendable_checking.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,13 @@ public actor MyActor: MyProto {
7373
public func foo<F>(aFoo: F) async where F: Sendable { }
7474
public func bar<B>(aBar: B) async where B: Sendable { }
7575
}
76+
77+
// rdar://82452688 - make sure sendable checking doesn't fire for a capture
78+
// of a value of error-type
79+
@available(SwiftStdlib 5.1, *)
80+
func f() async {
81+
let n = wobble() // expected-error{{cannot find 'wobble' in scope}}
82+
@Sendable func nested() {
83+
n.pointee += 1
84+
}
85+
}

0 commit comments

Comments
 (0)