Skip to content

Commit 6cc1212

Browse files
committed
Add test case for formerly missing diagnostic
We didn't diagnose conflicting generic signatures involving the SE-0361 syntax before #81304. Fixes rdar://152170450.
1 parent e493bb5 commit 6cc1212

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/decl/ext/specialize.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,9 @@ class State {
8686
extension Test.Key<State> {
8787
static let state = Self<State>()
8888
}
89+
90+
protocol P {}
91+
struct S: P {}
92+
93+
extension Sequence<any P> where Self == [S] {}
94+
// expected-error@-1 {{generic signature requires types 'S' and 'any P' to be the same}}

0 commit comments

Comments
 (0)