You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sema: Error for potentially unavailable conformances in Swift 6.
Diagnostics about use of potentially unavailable conformances had to be
downgraded to warnings in Swift 5 in order to preserve source compatibility.
These diagnostics should be errors by default in Swift 6.
Resolves rdar://88210812
func passAvailableConformance1(x:HasAvailableConformance1){ // expected-note 6{{add @available attribute to enclosing global function}}
28
-
takesHorse(x) // expected-warning {{conformance of 'HasAvailableConformance1' to 'Horse' is only available in macOS 100 or newer}}
28
+
takesHorse(x) // expected-warning {{conformance of 'HasAvailableConformance1' to 'Horse' is only available in macOS 100 or newer; this is an error in Swift 6}}
29
29
// expected-note@-1 {{add 'if #available' version check}}
30
30
31
-
takesHorseExistential(x) // expected-warning {{conformance of 'HasAvailableConformance1' to 'Horse' is only available in macOS 100 or newer}}
31
+
takesHorseExistential(x) // expected-warning {{conformance of 'HasAvailableConformance1' to 'Horse' is only available in macOS 100 or newer; this is an error in Swift 6}}
32
32
// expected-note@-1 {{add 'if #available' version check}}
33
33
34
-
x.giddyUp() // expected-warning {{conformance of 'HasAvailableConformance1' to 'Horse' is only available in macOS 100 or newer}}
34
+
x.giddyUp() // expected-warning {{conformance of 'HasAvailableConformance1' to 'Horse' is only available in macOS 100 or newer; this is an error in Swift 6}}
35
35
// expected-note@-1 {{add 'if #available' version check}}
36
36
37
-
_ = x.isGalloping // expected-warning {{conformance of 'HasAvailableConformance1' to 'Horse' is only available in macOS 100 or newer}}
37
+
_ = x.isGalloping // expected-warning {{conformance of 'HasAvailableConformance1' to 'Horse' is only available in macOS 100 or newer; this is an error in Swift 6}}
38
38
// expected-note@-1 {{add 'if #available' version check}}
39
39
40
-
_ =x[keyPath: \.isGalloping] // expected-warning {{conformance of 'HasAvailableConformance1' to 'Horse' is only available in macOS 100 or newer}}
40
+
_ =x[keyPath: \.isGalloping] // expected-warning {{conformance of 'HasAvailableConformance1' to 'Horse' is only available in macOS 100 or newer; this is an error in Swift 6}}
41
41
// expected-note@-1 {{add 'if #available' version check}}
42
42
43
-
_ = UsesHorse<HasAvailableConformance1>.self // expected-warning {{conformance of 'HasAvailableConformance1' to 'Horse' is only available in macOS 100 or newer}}
43
+
_ = UsesHorse<HasAvailableConformance1>.self // expected-warning {{conformance of 'HasAvailableConformance1' to 'Horse' is only available in macOS 100 or newer; this is an error in Swift 6}}
44
44
// expected-note@-1 {{add 'if #available' version check}}
0 commit comments