Skip to content

Conversation

tshortli
Copy link
Contributor

@tshortli tshortli commented Aug 8, 2025

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.

Resolves rdar://158172056.

@tshortli tshortli changed the title Sema: Rationalize availability checking in unavailable contexts. Sema: Rationalize availability checking in unavailable contexts Aug 8, 2025
@tshortli
Copy link
Contributor Author

tshortli commented Aug 8, 2025

@swift-ci please test

@tshortli tshortli force-pushed the allow-obsolete-in-unavailable-contexts branch 2 times, most recently from 441f37b to 9649daf Compare August 8, 2025 14:55
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.
@tshortli tshortli force-pushed the allow-obsolete-in-unavailable-contexts branch from 9649daf to 4d41db3 Compare August 8, 2025 14:58
@tshortli
Copy link
Contributor Author

tshortli commented Aug 8, 2025

@swift-ci please smoke test

@tshortli tshortli enabled auto-merge August 8, 2025 14:58
@tshortli tshortli merged commit 5e24617 into swiftlang:main Aug 8, 2025
3 checks passed
@tshortli tshortli deleted the allow-obsolete-in-unavailable-contexts branch August 8, 2025 22:40
tshortli added a commit to tshortli/swift that referenced this pull request Aug 13, 2025
The bug tracked by rdar://158172056 was already fixed by
swiftlang#83607 but this additional test case is
needed to ensure that conformances to Obj-C protocols with obsolete
requirements imported under legacy spellings not regress again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant