Commit Graph

10 Commits

Author SHA1 Message Date
Allan Shortlidge
aaa0e0a7b3 AST/Parse: Parse custom availability domain specs in if #available(...).
Delay resolution of availability domain identifiers parsed in availability
specifications until type-checking. This allows custom domain specifications to
be written in `if #available` queries.
2025-02-27 23:07:55 -08:00
Allan Shortlidge
db29a1c6f4 Parse/Sema: Move #available query wildcard diagnostics to Sema.
In order to unblock resolution of availability domains during type-checking
instead of parsing, diagnostics about missing or superfluous wildcards in
availability specification lists need to move to Sema.
2025-02-23 22:09:33 -08:00
Bruno Rocha
1fe3857735 [SE-0290] Add #unavailable 2021-07-02 13:35:11 +02:00
Alexis Laferrière
eb28e2acbc Update tests to check unavailable and obsoleted attributes on extensions 2019-07-03 11:40:11 -07:00
Karoy Lorentey
1069fc2c44 Revert "Support unavailable and obsoleted attributes on extensions" (#25127) 2019-05-29 15:16:49 -07:00
Alexis Laferrière
67798cdcf3 Update tests to check unavailable and obsoleted attributes on extensions 2019-05-24 10:22:30 -07:00
Jordan Rose
23260b8e7b Revert "'@available' without an OS is ignored on extensions" warning (#16298)
This is still useful for the feature where deprecated declarations are
allowed to be used within a context that's marked deprecated. There's
probably a better balance to be found here, because marking the
extension deprecated still does not mark all the members deprecated,
but for now it still has an effect, and we shouldn't produce a warning
for legitimately making use of that effect.

The warning was added in f21d9f332, mostly as an opportunity "fix".

https://bugs.swift.org/browse/SR-7577
2018-05-02 16:53:24 -07:00
Jordan Rose
f21d9f332d Allow @available(swift, ...) nested within @available(macOS, ...)
Previously, we treated this as an attempt to widen the availability
of a member beyond its context, but it's really a different axis of
availability.

Also, warn about using @available on extensions without an OS, which
we just completely ignore right now.

rdar://problem/32632327
2018-03-14 16:37:36 -07:00
David Farler
b7d17b25ba Rename -parse flag to -typecheck
A parse-only option is needed for parse performance tracking and the
current option also includes semantic analysis.
2016-11-28 10:50:55 -08:00
Graydon Hoare
168ba39bc7 Add tests for @available(swift N) 2016-10-12 11:21:30 -07:00