mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
If a conformance is found in an imported module as well as the current module, and one of the two conformances is conditionally unavailable on the current deployment target, pick the one that is always available. Fixes <rdar://problem/78633800>.
16 lines
367 B
Swift
16 lines
367 B
Swift
public protocol P {}
|
|
|
|
public struct HasUnavailableConformance {}
|
|
|
|
@available(*, unavailable)
|
|
extension HasUnavailableConformance : P {}
|
|
|
|
public struct HasConditionallyAvailableConformance {}
|
|
|
|
@available(macOS 100, *)
|
|
extension HasConditionallyAvailableConformance : P {}
|
|
|
|
public struct HasAlwaysAvailableConformance {}
|
|
|
|
extension HasAlwaysAvailableConformance : P {}
|