swift
6d1a6c5f - Sema: Avoid application extension platforms in `if #available` fix-its.

Commit
1 year ago
Sema: Avoid application extension platforms in `if #available` fix-its. When the type checker noticed that a declaration with application extension availability markup was used somewhere that it would be potentially unavailable at runtime, the fix-it emitted by the compiler would check for the application extension platform's availability: ``` if #available(macOSApplicationExtension 12, *) { // Use potentially unavailable declarations } ``` This runtime check won't work. The fix-it should just suggest checking the availability of the base, non-extension platform instead. Resolves rdar://125860317.
Author
Committer
Parents
Loading