Skip to content

Commit d8138f7

Browse files
authored
Add visionOS in some places it was missing (#313)
Cross referenced the definition here: https://github.com/apple/swift/blob/main/include/swift/AST/PlatformKinds.def#L28 Fixes: rdar://129595552
2 parents 3c61024 + 4687956 commit d8138f7

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

TSPL.docc/GuidedTour/Compatibility.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Concurrency requires the Swift 5 language mode
3333
and a version of the Swift standard library
3434
that provides the corresponding concurrency types.
3535
On Apple platforms, set a deployment target
36-
of at least iOS 13, macOS 10.15, tvOS 13, or watchOS 6.
36+
of at least iOS 13, macOS 10.15, tvOS 13, watchOS 6, or visionOS 1.
3737

3838
A target written in Swift 6 can depend on
3939
a target that's written in Swift 5, Swift 4.2 or Swift 4,

TSPL.docc/LanguageGuide/ControlFlow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2159,7 +2159,7 @@ the body of the `if` executes on the minimum deployment target specified by your
21592159

21602160
In its general form,
21612161
the availability condition takes a list of platform names and versions.
2162-
You use platform names such as `iOS`, `macOS`, `watchOS`, and `tvOS` ---
2162+
You use platform names such as `iOS`, `macOS`, `watchOS`, `tvOS`, and `visionOS` ---
21632163
for the full list, see <doc:Attributes#Declaration-Attributes>.
21642164
In addition to specifying major version numbers like iOS 8 or macOS 10.10,
21652165
you can specify minor versions numbers like iOS 11.2.6 and macOS 10.13.3.

TSPL.docc/ReferenceManual/Statements.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,7 +1253,7 @@ see <doc:Expressions#Explicit-Member-Expression>.
12531253
> *platform-condition* **`canImport`** **`(`** *import-path* **`)`** \
12541254
> *platform-condition* **`targetEnvironment`** **`(`** *environment* **`)`**
12551255
>
1256-
> *operating-system* **`macOS`** | **`iOS`** | **`watchOS`** | **`tvOS`** | **`Linux`** | **`Windows`** \
1256+
> *operating-system* **`macOS`** | **`iOS`** | **`watchOS`** | **`tvOS`** | **`visionOS`** | **`Linux`** | **`Windows`** \
12571257
> *architecture* **`i386`** | **`x86_64`** | **`arm`** | **`arm64`** \
12581258
> *swift-version* *decimal-digits* *swift-version-continuation*_?_ \
12591259
> *swift-version-continuation* **`.`** *decimal-digits* *swift-version-continuation*_?_ \
@@ -1341,7 +1341,7 @@ The compiler uses the information from the availability condition
13411341
when it verifies that the APIs in that block of code are available.
13421342

13431343
The availability condition takes a comma-separated list of platform names and versions.
1344-
Use `iOS`, `macOS`, `watchOS`, and `tvOS` for the platform names,
1344+
Use `iOS`, `macOS`, `watchOS`, `tvOS` and `visionOS` for the platform names,
13451345
and include the corresponding version numbers.
13461346
The `*` argument is required and specifies that, on any other platform,
13471347
the body of the code block guarded by the availability condition
@@ -1398,7 +1398,8 @@ It has the same meaning as the `*` argument in an availability condition.
13981398
>> macOS 1, macOSApplicationExtension 1,
13991399
>> macCatalyst 1, macCatalystApplicationExtension 1,
14001400
>> watchOS 1, watchOSApplicationExtension 1,
1401-
>> tvOS 1, tvOSApplicationExtension 1, *) {
1401+
>> tvOS 1, tvOSApplicationExtension 1,
1402+
>> visionOS 1, visionOSApplicationExtension 1, *) {
14021403
>> print("a")
14031404
>> } else {
14041405
>> print("b")

TSPL.docc/ReferenceManual/SummaryOfTheGrammar.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ make the same change here also.
698698
> *platform-condition***`canImport`** **`(`** *import-path* **`)`** \
699699
> *platform-condition***`targetEnvironment`** **`(`** *environment* **`)`**
700700
>
701-
> *operating-system***`macOS`** | **`iOS`** | **`watchOS`** | **`tvOS`** | **`Linux`** | **`Windows`** \
701+
> *operating-system***`macOS`** | **`iOS`** | **`watchOS`** | **`tvOS`** | **`visionOS`** | **`Linux`** | **`Windows`** \
702702
> *architecture***`i386`** | **`x86_64`** | **`arm`** | **`arm64`** \
703703
> *swift-version**decimal-digits* *swift-version-continuation*_?_ \
704704
> *swift-version-continuation***`.`** *decimal-digits* *swift-version-continuation*_?_ \

0 commit comments

Comments
 (0)