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
AST: Diagnose unrecognized platforms as errors with CustomAvailability enabled.
When the CustomAvailability experimental feature is enabled, make it an error
to specify an unrecognized availability domain name. Also, add these
diagnostics to a diagnostic group so that developers can control their behavior
when they are warnings.
Resolves rdar://152741624.
Warnings that identify unrecognized platform names in `@available` attributes and `if #available` statements.
4
+
5
+
## Overview
6
+
7
+
The `AvailabilityUnrecognizedName` group covers warnings emitted when the platform name specified in an availability related construct is unrecognized by the compiler:
8
+
9
+
```
10
+
@available(NotAValidPlatform, introduced: 1.0) // warning: unrecognized platform name 'NotAValidPlatform'
11
+
public func function() {
12
+
if #available(NotAValidPlatform 2.0, *) { // warning: unrecognized platform name 'NotAValidPlatform'
13
+
// ...
14
+
}
15
+
}
16
+
```
17
+
18
+
Availability specifications with unrecognized platform names in `@available` attributes and `#available` queries are ignored by the compiler.
0 commit comments