From 0ff6614c70d544a382dca607cf38b7e38ad59c67 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Thu, 23 Oct 2025 12:57:32 -0400 Subject: [PATCH] Add regression test for fixed crasher --- test/Generics/issue-85084.swift | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/Generics/issue-85084.swift 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() + } +}