forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow unavailable conformances to non-Sendaable protocols during cont…
…raction Refusing to acknowledge unavailable conformances at this point in the requirement machine doesn't allow us to make use of unavailable conformances from unavailable contexts, something which code currently depends on. Limit the new filtering behavior to `Sendable` conformances where we need them, as a narrow fix for this regression. We'll revisit the approach here later. Fixes rdar://94154905.
- Loading branch information
1 parent
6267513
commit 904a2ff
Showing
3 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// RUN: %target-typecheck-verify-swift | ||
|
||
protocol P { } | ||
|
||
struct X { } | ||
|
||
@available(*, unavailable) | ||
extension X: P { } | ||
|
||
struct Y<T: P> { } | ||
|
||
@available(*, unavailable) | ||
extension Y { | ||
// Okay, because the unavailable conformance is used within an | ||
// unavailable context. | ||
init() where T == X { } | ||
} |