You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/Generics/associated_type_where_clause_hints.swift
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -23,14 +23,14 @@ protocol P2 : P1 {
23
23
// A redeclaration of an associated type that adds type/layout requirements
24
24
// should be written via a where clause.
25
25
protocolP3a:P1{
26
-
associatedtypeA:P0, P0b // expected-warning{{redeclaration of associated type 'A' from protocol 'P1' is better expressed as a 'where' clause on the protocol}}{{18-18= where A: P0, A: P0b}}{{3-29=}}
26
+
associatedtypeA:P0, P0b // expected-warning{{redeclaration of associated type 'A' from protocol 'P1' is better expressed as a 'where' clause on the protocol}}{{25:18-25:18= where A: P0, A: P0b}}{{26:3-26:29=}}
27
27
associatedtypeA2:P0, P0b where A2.A ==Never, A2:P1 // expected-warning{{redeclaration of associated type 'A2' from protocol 'P1' is better expressed as a 'where' clause on the protocol}}{{18-18= where A2: P0, A2: P0b, A2.A == Never, A2 : P1}}{{3-58=}}
28
28
associatedtypeA3where A3:P0 // expected-warning{{redeclaration of associated type 'A3' from protocol 'P1' is better expressed as a 'where' clause on the protocol}}{{18-18= where A3 : P0}}{{3-34=}}
29
29
30
-
// expected-warning@+1 {{redeclaration of associated type 'A4' from protocol 'P1' is better expressed as a 'where' clause on the protocol}}{{18-18= where A4: P0, A4 : Collection, A4.Element == A4.Index, A4.SubSequence == A4}}{{3-52=}}
30
+
// expected-warning@+1 {{redeclaration of associated type 'A4' from protocol 'P1' is better expressed as a 'where' clause on the protocol}}{{25:18-25:18= where A4: P0, A4 : Collection, A4.Element == A4.Index, A4.SubSequence == A4}}{{31:3-33:51=}}
31
31
associatedtypeA4:P0where A4:Collection,
32
32
A4.Element ==A4.Index,
33
-
A4.SubSequence ==A4 // {{3-52=}} is this line, so it is correct.
0 commit comments