mirror of
https://github.com/apple/swift.git
synced 2026-11-24 07:03:51 +01:00
The only way to avoid a source break when introducing a reparenting is to allow implied conditional conformance to a @reparentable protocol, as prior code would not have explicitly stated it.
16 lines
420 B
Swift
16 lines
420 B
Swift
// RUN: %target-typecheck-verify-swift -enable-experimental-feature Reparenting
|
|
|
|
// REQUIRES: swift_feature_Reparenting
|
|
|
|
protocol P {}
|
|
|
|
@reparentable protocol Reparentable {}
|
|
protocol S: Reparentable {}
|
|
|
|
struct Nachos<T> {}
|
|
extension Nachos: S where T: P {}
|
|
|
|
// Expect no error here the conditional conformance to S
|
|
// implying conformance to Reparentable and needing to
|
|
// write that in a separate extension of Nachos.
|