Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions test/Generics/sr15790.swift
Original file line number Diff line number Diff line change
@@ -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: <Self where Self.[P1]X : P1, Self.[P1]X == Self.[P1]X.[P1]X>
public protocol P1 {
associatedtype X: P1 where X.X == X
}

// CHECK-LABEL: sr15790.(file).P2@
// CHECK-NEXT: Requirement signature: <Self where Self : Collection, Self : P1, Self.[Sequence]Element : P1, Self.[P1]X == Self.[P2]Z.[P2]Y, Self.[P2]Y : P3, Self.[P2]Z : P2>
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: <Self where Self : P2, Self.[P3]T : P2>
public protocol P3: P2 {
associatedtype T: P2
}