AST: Introduce the SwiftLanguageMode availability domain spelling.

Require `-enable-experimental-feature SwiftRuntimeAvailability` to use this new
spelling.
This commit is contained in:
Allan Shortlidge
2025-10-07 09:50:39 -07:00
parent 4e9a883824
commit 2d8465b043
8 changed files with 69 additions and 17 deletions

View File

@@ -58,10 +58,13 @@ func testMemberAvailability() {
TestStruct().doAnotherThing() // expected-error {{'doAnotherThing()' is unavailable}}
}
@available(swift 400) // FIXME: This has no effect and should be complained about.
@available(swift 400)
@available(macOS 10.11, *)
extension TestStruct {}
@available(macOS 10.11, *)
@available(swift 400) // FIXME: This has no effect and should be complained about.
@available(swift 400)
extension TestStruct {}
@available(SwiftLanguageMode 400) // expected-error {{Swift requires '-enable-experimental-feature SwiftRuntimeAvailability'}}
extension TestStruct {}