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/Parse/deprecated_where.swift
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -64,3 +64,16 @@ struct S23<T where T: Comparable> where T: Equatable {} // expected-warning {{'w
64
64
// 1,2,3
65
65
structS123<T:Hashablewhere T:Comparable>where T:Equatable{} // expected-warning {{'where' clause next to generic parameters is deprecated and will be removed in the future version of Swift}} {{24-44=}} {{46-51=where T: Comparable,}}
66
66
67
+
68
+
protocolProtoA{}
69
+
protocolProtoB{}
70
+
protocolProtoC{}
71
+
protocolProtoD{}
72
+
func testCombinedConstraints<T:ProtoA&ProtoBwhere T:ProtoC>(x:T){} // expected-warning {{'where' clause next to generic parameters is deprecated and will be removed in the future version of Swift}} {{48-64=}} {{71-71= where T: ProtoC}}
73
+
func testCombinedConstraints<T:ProtoA&ProtoBwhere T:ProtoC>(x:T)where T:ProtoD{} // expected-warning {{'where' clause next to generic parameters is deprecated and will be removed in the future version of Swift}} {{48-64=}} {{72-77=where T: ProtoC,}}
74
+
75
+
func testCombinedConstraintsOld<T:protocol<ProtoA,ProtoB>where T:ProtoC>(x:T){} // expected-warning {{'where' clause next to generic parameters is deprecated and will be removed in the future version of Swift}} {{60-76=}} {{83-83= where T: ProtoC}}
76
+
// expected-warning@-1 {{'protocol<...>' composition syntax is deprecated}}
77
+
func testCombinedConstraintsOld<T:protocol<ProtoA,ProtoB>where T:ProtoC>(x:T)where T:ProtoD{} // expected-warning {{'where' clause next to generic parameters is deprecated and will be removed in the future version of Swift}} {{60-76=}} {{84-89=where T: ProtoC,}}
78
+
// expected-warning@-1 {{'protocol<...>' composition syntax is deprecated}}
0 commit comments