swift
eafea5b2 - Sema: Relax availability checking in universally unavailable contexts.

Commit
1 year ago
Sema: Relax availability checking in universally unavailable contexts. Recent refactoring fixed a bug that previously caused `f()` to be checked as if it were unavailable only on macOS in the following example: ``` @available(macOS, unavailable) struct Outer { @available(*, unavailable) func f() { someFunctionUnavailableOnMacOS() } } ``` Unfortunately, fixing that bug made a different existing availability checking rule more problematic. References to declarations that are unavailable on the current platform have been diagnosed as unavailable even in contexts that are universally unavailable. This long standing behavior is overly strict but it rarely had consequences. However, now that the example above is modeled correctly, this overly strict behavior is causing some source compatibility issues. The easiest solution is to relax the overly strict checking. Resolves rdar://141124478.
Author
Committer
Parents
Loading