// RUN: %target-swift-frontend -typecheck %s -debug-generic-signatures 2>&1 | %FileCheck %s // This is a funny monoid presentation from Joe Groff. // CHECK-LABEL: joe_monoid.(file).O1@ // CHECK-LABEL: Requirement signature: protocol O1 { associatedtype R : O1 associatedtype C : O1 where C.C.C.C == Self, C.C.R.C.C.R == Self, R.C.R.C.R.C == Self } // CHECK-LABEL: joe_monoid.(file).O2@ // CHECK-LABEL: Requirement signature: protocol O2 { associatedtype R : O2 associatedtype C : O2 where Self == C.C.C.C, C.C.C.C == C.C.R.C.C.R, C.C.R.C.C.R == R.C.R.C.R.C } // The GSB incorrectly minimized this one, dropping all of the same-type requirements. // CHECK-LABEL: joe_monoid.(file).O3@ // CHECK-LABEL: Requirement signature: protocol O3 { associatedtype R : O3 associatedtype C : O3 where C.C.C.C == C.C.R.C.C.R, C.C.R.C.C.R == R.C.R.C.R.C, R.C.R.C.R.C == Self } // CHECK-LABEL: joe_monoid.(file).O4@ // CHECK-LABEL: Requirement signature: protocol O4 { associatedtype R : O4 associatedtype C : O4 where Self == C.C.C.C, C.C == R.C.C.R, C.R.C == R.C.R }