Skip to content

Commit 563d942

Browse files
committed
Enable availability-checking on objc_async.swift test
I'm re-enabling availability checking in the test/ClangImporter/objc_async.swift test because I want to perform an availability check in the future. In re-enabling it, I came across a warning with a fixme and a test failure on the line. Given that the expected warning has a fixme and is currently filled in with "something about missing conformance", I think this is the warning message that they were looking for. Supplying that gets the test passing with availability-checking enabled.
1 parent 1cfb8f0 commit 563d942

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/ClangImporter/objc_async.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -I %S/Inputs/custom-modules -disable-availability-checking %s -verify -verify-additional-file %swift_src_root/test/Inputs/clang-importer-sdk/usr/include/ObjCConcurrency.h -warn-concurrency
1+
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -I %S/Inputs/custom-modules %s -verify -verify-additional-file %swift_src_root/test/Inputs/clang-importer-sdk/usr/include/ObjCConcurrency.h -warn-concurrency
22

33
// REQUIRES: objc_interop
44
// REQUIRES: concurrency
55
import Foundation
66
import ObjCConcurrency
77

8+
if #available(SwiftStdlib 5.5, *) {
9+
810
@MainActor func onlyOnMainActor() { }
911

1012
func testSlowServer(slowServer: SlowServer) async throws {
@@ -120,7 +122,7 @@ func testSendableAttrs(
120122
func takesSendable<T: Sendable>(_: T) {}
121123

122124
takesSendable(sendableClass) // no-error
123-
takesSendable(nonSendableClass) // expected-FIXME-warning{{something about missing conformance}}
125+
takesSendable(nonSendableClass) // expected-warning{{conformance of 'NonSendableClass' to 'Sendable' is unavailable}}
124126

125127
doSomethingConcurrently {
126128
print(sendableClass) // no-error
@@ -213,3 +215,5 @@ func testMirrored(instance: ClassWithAsync) async {
213215
}
214216
}
215217
}
218+
219+
} // SwiftStdlib 5.5

0 commit comments

Comments
 (0)