mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This logic was introduced in https://github.com/swiftlang/swift/pull/75135. The intent was to prevent an implied conformance from overriding an existing unavailable one, for example in the case of Sendable. Let's relax this check a bit to only diagnose if the mismatch is in the unconditional availability, and not OS version. Fixes rdar://142873265.
9 lines
224 B
Swift
9 lines
224 B
Swift
|
|
@available(macOS 200, *)
|
|
extension Conformer1: Derived2 {}
|
|
|
|
@available(macOS 100, *)
|
|
extension Conformer2: Derived1 {}
|
|
// expected-error@-1 {{conformance of 'Conformer2' to 'Base' is only available in macOS 200 or newer}}
|
|
|