diff --git a/test/Generics/sr15790.swift b/test/Generics/sr15790.swift new file mode 100644 index 0000000000000..b8011fafb3207 --- /dev/null +++ b/test/Generics/sr15790.swift @@ -0,0 +1,20 @@ +// RUN: %target-swift-frontend -typecheck %s -debug-generic-signatures -requirement-machine-protocol-signatures=on 2>&1 | %FileCheck %s + +// CHECK-LABEL: sr15790.(file).P1@ +// CHECK-NEXT: Requirement signature: +public protocol P1 { + associatedtype X: P1 where X.X == X +} + +// CHECK-LABEL: sr15790.(file).P2@ +// CHECK-NEXT: Requirement signature: +public protocol P2: Collection, P1 where Element: P1, X == Z.Y { + associatedtype Y: P3 + associatedtype Z: P2 +} + +// CHECK-LABEL: sr15790.(file).P3@ +// CHECK-NEXT: Requirement signature: +public protocol P3: P2 { + associatedtype T: P2 +}