Skip to content

Commit 6d624aa

Browse files
committed
Tests: Increase test coverage for _PackageDescription availability.
1 parent 44ff7e5 commit 6d624aa

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/attr/attr_availability_swiftpm_v4.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,10 @@ unconditionallyRenamed() // expected-error {{'unconditionallyRenamed()' has been
7979
func unconditionallyRenamedAndIntroducedLater() {} // expected-note {{'unconditionallyRenamedAndIntroducedLater()' has been explicitly marked unavailable here}}
8080

8181
unconditionallyRenamedAndIntroducedLater() // expected-error {{'unconditionallyRenamedAndIntroducedLater()' has been renamed to 'shortFour'}}
82+
83+
func testQuery() {
84+
if #available(_PackageDescription 4.0) { // expected-error {{PackageDescription version checks not allowed in #available(...)}}
85+
// expected-error@-1 {{condition required for target platform}}
86+
shortFourPointOh()
87+
}
88+
}

0 commit comments

Comments
 (0)