// RUN: %target-typecheck-verify-swift // RUN: %target-swift-frontend -typecheck %s -debug-generic-signatures 2>&1 | %FileCheck %s protocol P {} protocol Q { associatedtype T : P } class S : Q {} struct G where X : Q { // no redundancies func foo1() where X == S {} // CHECK: Generic signature: , Y : P> func foo2() where X == S, Y : P {} // CHECK: Generic signature: , Y : P> // 'X : Q' is redundant func foo3() where X : Q, X == S, Y : P {} // CHECK: Generic signature: , Y : P> // 'T.T : P' is redundant func foo4(_: T) where X == S, T.T : P {} // CHECK: Generic signature: , Y : P, T : Q> } func foo(_: X, _: Y) where X : Q, X : S, Y : P {} // CHECK: Generic signature: , Y : P>