diff --git a/test/Generics/issue-85084.swift b/test/Generics/issue-85084.swift new file mode 100644 index 0000000000000..e8b2b7575fe98 --- /dev/null +++ b/test/Generics/issue-85084.swift @@ -0,0 +1,19 @@ +// RUN: %target-typecheck-verify-swift + +protocol P1 {} + +protocol P2 { + associatedtype U +} + +protocol P3 { + associatedtype T: P2 +} + +struct S1: P3 where T.U: P1 {} + +extension P3 where Self == S1 { // expected-error {{same-type constraint 'Self' == 'S1' is recursive}} + static var a: S1 { + S1() + } +}