Commit Graph

11 Commits

Author SHA1 Message Date
Allan Shortlidge
4d41db3b5d Sema: Rationalize availability checking in unavailable contexts.
Correct several behaviors of availability checking in unavailable contexts that
were inconsistent with the checking model:

- Avoid diagnosing unintroduced and obsolted declarations in contexts that are
  unavailable in the same domain.
- Diagnose unavailability normally in type signature contexts.
2025-08-08 07:57:44 -07:00
Allan Shortlidge
67cc4c6ec3 Sema: Diagnose override availability for custom domains.
Resolves rdar://156159486.
2025-07-26 18:46:05 -07:00
Allan Shortlidge
0fabfa3f99 Sema: Check custom domain availability during conformance checking.
Protocol requirement witnesses cannot only be available in a custom
availability domain if the requirement does not have the same availability
constraint.

Resolves rdar://156462516.
2025-07-25 21:30:53 -07:00
Allan Shortlidge
8cb20c3f4e AST: Fix a crash when handling duplicate available attrs. 2025-07-25 15:14:53 -07:00
Allan Shortlidge
5601e66a69 Sema: Generalize more-available-than-enclosing-decl diagnostics.
NFC.
2025-07-18 13:27:08 -07:00
Allan Shortlidge
034c62cf01 AST: Generalize availability fix-its to support custom availability domains.
Resolves rdar://156118254.
2025-07-18 13:27:08 -07:00
Allan Shortlidge
aeb5a46d9e AST: Emit warnings for redundant availability checks in custom domains. 2025-07-18 13:27:08 -07:00
Allan Shortlidge
59d74fa1c7 Sema: Diagnose opaque types that depend on availability of a custom domain.
Serialization and IRGen don't yet support opaque return types that would depend
on querying availability of a custom domain so we need to reject this code to
avoid mis-compiling it.
2025-07-02 11:23:42 -07:00
Allan Shortlidge
897a74f495 Tests: Move some availability tests into a new test/Availability directory.
Un-reverts 9c01ee2c1b.

Also, add myself as a reviewer for more availability related files.

NFC.
2025-06-23 15:57:34 -07:00
Allan Shortlidge
de1017fef4 Revert "Move some availability tests into a new test/Availability directory"
This reverts commit 9c01ee2c1b.
2025-06-08 22:22:41 -07:00
Slava Pestov
9c01ee2c1b Move some availability tests into a new test/Availability directory 2025-06-06 17:10:42 -04:00