Files
swift-mirror/test/Generics/conditional_conformances_reparenting.swift
Kavon Farvardin 6a915549eb Reparenting: allow implied conditional conformances
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.
2026-02-06 16:20:56 -08:00

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.