We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 549bace commit 9d0e019Copy full SHA for 9d0e019
test/Concurrency/sendable_methods.swift
@@ -255,3 +255,25 @@ func test_initializer_ref() {
255
test(initRef) // Ok
256
test(Array<Int>.init) // Ok
257
}
258
+
259
+// rdar://119593407 - incorrect errors when partially applied member is accessed with InferSendableFromCaptures
260
+do {
261
+ @MainActor struct ErrorHandler {
262
+ static func log(_ error: Error) {}
263
+ }
264
265
+ @MainActor final class Manager {
266
+ static var shared: Manager!
267
268
+ func test(_: @escaping @MainActor (Error) -> Void) {
269
270
271
272
+ @MainActor class Test {
273
+ func schedule() {
274
+ Task {
275
+ Manager.shared.test(ErrorHandler.log) // Ok (access is wrapped in an autoclosure)
276
277
278
279
+}
0 commit comments