Skip to content

[6.2] Update utils/availability-macros.def #83300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion include/swift/AST/RuntimeVersions.def
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,10 @@ RUNTIME_VERSION(

RUNTIME_VERSION(
(6, 2),
FUTURE
PLATFORM(macOS, (26, 0, 0))
PLATFORM(iOS, (26, 0, 0))
PLATFORM(watchOS, (26, 0, 0))
PLATFORM(visionOS,(26, 0, 0))
)

END_MAJOR_VERSION(6)
Expand Down
4 changes: 2 additions & 2 deletions stdlib/public/Concurrency/UnimplementedExecutor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import Swift

// .. Main Executor ............................................................

@available(SwiftStdlib 6.2, *)
@available(StdlibDeploymentTarget 6.2, *)
final class UnimplementedMainExecutor: MainExecutor, @unchecked Sendable {
public init() {}

Expand Down Expand Up @@ -45,7 +45,7 @@ final class UnimplementedMainExecutor: MainExecutor, @unchecked Sendable {

// .. Task Executor ............................................................

@available(SwiftStdlib 6.2, *)
@available(StdlibDeploymentTarget 6.2, *)
final class UnimplementedTaskExecutor: TaskExecutor, @unchecked Sendable {
public init() {}

Expand Down
6 changes: 3 additions & 3 deletions test/Availability/value_generics_availability.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

// REQUIRES: OS=macosx

struct A<let N: Int> {} // expected-error {{values in generic types are only available in macOS 99.99.0 or newer}}
struct A<let N: Int> {} // expected-error {{values in generic types are only available in macOS 26.0.0 or newer}}
// expected-note@-1 {{add '@available' attribute to enclosing generic struct}}

class B<let N: Int> {} // expected-error {{values in generic types are only available in macOS 99.99.0 or newer}}
class B<let N: Int> {} // expected-error {{values in generic types are only available in macOS 26.0.0 or newer}}
// expected-note@-1 {{add '@available' attribute to enclosing generic class}}

enum C<let N: Int> {} // expected-error {{values in generic types are only available in macOS 99.99.0 or newer}}
enum C<let N: Int> {} // expected-error {{values in generic types are only available in macOS 26.0.0 or newer}}
// expected-note@-1 {{add '@available' attribute to enclosing generic enum}}

func something<let N: Int>(_: A<N>) {} // OK, because A can't reference value generics.
2 changes: 1 addition & 1 deletion utils/availability-macros.def
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ SwiftStdlib 5.9:macOS 14.0, iOS 17.0, watchOS 10.0, tvOS 17.0
SwiftStdlib 5.10:macOS 14.4, iOS 17.4, watchOS 10.4, tvOS 17.4, visionOS 1.1
SwiftStdlib 6.0:macOS 15.0, iOS 18.0, watchOS 11.0, tvOS 18.0, visionOS 2.0
SwiftStdlib 6.1:macOS 15.4, iOS 18.4, watchOS 11.4, tvOS 18.4, visionOS 2.4
SwiftStdlib 6.2:macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, visionOS 9999
SwiftStdlib 6.2:macOS 26.0, iOS 26.0, watchOS 26.0, tvOS 26.0, visionOS 26.0

# Like SwiftStdlib 5.0, but also the oldest visionOS.
SwiftCompatibilitySpan 5.0:macOS 10.14.4, iOS 12.2, watchOS 5.2, tvOS 12.2, visionOS 1.0
Expand Down