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
// References on protocol metatype are only allowed through a leading dot syntax
44
44
45
45
_ =P.property // expected-error {{static member 'property' cannot be used on protocol metatype 'P.Protocol'}}
46
-
// expected-error@-1 {{static property 'property' requires the types 'P' and 'S' be equivalent}}
46
+
// expected-error@-1 {{static property 'property' requires the types 'Self' and 'S' be equivalent}}
47
47
_ =P.property.other // expected-error {{static member 'property' cannot be used on protocol metatype 'P.Protocol'}}
48
-
// expected-error@-1 {{static property 'property' requires the types 'P' and 'S' be equivalent}}
48
+
// expected-error@-1 {{static property 'property' requires the types 'Self' and 'S' be equivalent}}
49
49
_ =P.iuoProp // expected-error {{static member 'iuoProp' cannot be used on protocol metatype 'P.Protocol'}}
50
-
// expected-error@-1 {{static property 'iuoProp' requires the types 'P' and 'S' be equivalent}}
50
+
// expected-error@-1 {{static property 'iuoProp' requires the types 'Self' and 'S' be equivalent}}
51
51
_ =P.iuoProp.other // expected-error {{static member 'iuoProp' cannot be used on protocol metatype 'P.Protocol'}}
52
-
// expected-error@-1 {{static property 'iuoProp' requires the types 'P' and 'S' be equivalent}}
52
+
// expected-error@-1 {{static property 'iuoProp' requires the types 'Self' and 'S' be equivalent}}
53
53
_ =P.optProp // expected-error {{static member 'optProp' cannot be used on protocol metatype 'P.Protocol'}}
54
-
// expected-error@-1 {{static property 'optProp' requires the types 'P' and 'S' be equivalent}}
54
+
// expected-error@-1 {{static property 'optProp' requires the types 'Self' and 'S' be equivalent}}
55
55
_ =P.optProp?.other // expected-error {{static member 'optProp' cannot be used on protocol metatype 'P.Protocol'}}
56
-
// expected-error@-1 {{static property 'optProp' requires the types 'P' and 'S' be equivalent}}
56
+
// expected-error@-1 {{static property 'optProp' requires the types 'Self' and 'S' be equivalent}}
57
57
_ =P.fnProp // expected-error {{static member 'fnProp' cannot be used on protocol metatype 'P.Protocol'}}
58
-
// expected-error@-1 {{static property 'fnProp' requires the types 'P' and 'S' be equivalent}}
58
+
// expected-error@-1 {{static property 'fnProp' requires the types 'Self' and 'S' be equivalent}}
59
59
_ =P.fnProp() // expected-error {{static member 'fnProp' cannot be used on protocol metatype 'P.Protocol'}}
60
-
// expected-error@-1 {{static property 'fnProp' requires the types 'P' and 'S' be equivalent}}
60
+
// expected-error@-1 {{static property 'fnProp' requires the types 'Self' and 'S' be equivalent}}
61
61
_ =P.fnProp().other // expected-error {{static member 'fnProp' cannot be used on protocol metatype 'P.Protocol'}}
62
-
// expected-error@-1 {{static property 'fnProp' requires the types 'P' and 'S' be equivalent}}
62
+
// expected-error@-1 {{static property 'fnProp' requires the types 'Self' and 'S' be equivalent}}
63
63
_ =P.method() // expected-error {{static member 'method' cannot be used on protocol metatype 'P.Protocol'}}
64
-
// expected-error@-1 {{referencing static method 'method()' on 'static_members_on_protocol_in_generic_context.P' requires the types 'static_members_on_protocol_in_generic_context.P' and 'S' be equivalent}}
64
+
// expected-error@-1 {{referencing static method 'method()' on 'P' requires the types 'Self' and 'S' be equivalent}}
65
65
_ =P.method // expected-error {{static member 'method' cannot be used on protocol metatype 'P.Protocol'}}
66
-
// expected-error@-1 {{referencing static method 'method()' on 'static_members_on_protocol_in_generic_context.P' requires the types 'static_members_on_protocol_in_generic_context.P' and 'S' be equivalent}}
66
+
// expected-error@-1 {{referencing static method 'method()' on 'P' requires the types 'Self' and 'S' be equivalent}}
67
67
_ =P.method().other // expected-error {{static member 'method' cannot be used on protocol metatype 'P.Protocol'}}
68
-
// expected-error@-1 {{referencing static method 'method()' on 'static_members_on_protocol_in_generic_context.P' requires the types 'static_members_on_protocol_in_generic_context.P' and 'S' be equivalent}}
68
+
// expected-error@-1 {{referencing static method 'method()' on 'P' requires the types 'Self' and 'S' be equivalent}}
69
69
_ =P.genericFn(42) // expected-error {{static member 'genericFn' cannot be used on protocol metatype 'P.Protocol'}}
70
-
// expected-error@-1 {{static method 'genericFn' requires the types 'P' and 'G<Int>' be equivalent}}
70
+
// expected-error@-1 {{static method 'genericFn' requires the types 'Self' and 'G<Int>' be equivalent}}
71
71
_ =P.genericFn(42).other // expected-error {{static member 'genericFn' cannot be used on protocol metatype 'P.Protocol'}}
72
-
// expected-error@-1 {{static method 'genericFn' requires the types 'P' and 'G<Int>' be equivalent}}
72
+
// expected-error@-1 {{static method 'genericFn' requires the types 'Self' and 'G<Int>' be equivalent}}
73
73
_ =P[42] // expected-error {{static member 'subscript' cannot be used on protocol metatype 'P.Protocol'}}
74
-
// expected-error@-1 {{referencing static subscript 'subscript(_:)' on 'static_members_on_protocol_in_generic_context.P' requires the types 'static_members_on_protocol_in_generic_context.P' and 'S' be equivalent}}
74
+
// expected-error@-1 {{referencing static subscript 'subscript(_:)' on 'P' requires the types 'Self' and 'S' be equivalent}}
75
75
_ =P[42].other // expected-error {{static member 'subscript' cannot be used on protocol metatype 'P.Protocol'}}
76
-
// expected-error@-1 {{referencing static subscript 'subscript(_:)' on 'static_members_on_protocol_in_generic_context.P' requires the types 'static_members_on_protocol_in_generic_context.P' and 'S' be equivalent}}
76
+
// expected-error@-1 {{referencing static subscript 'subscript(_:)' on 'P' requires the types 'Self' and 'S' be equivalent}}
77
77
_ =P[t:42] // expected-error {{static member 'subscript' cannot be used on protocol metatype 'P.Protocol'}}
78
-
// expected-error@-1 {{static subscript 'subscript(t:)' requires the types 'P' and 'G<Int>' be equivalent}}
78
+
// expected-error@-1 {{static subscript 'subscript(t:)' requires the types 'Self' and 'G<Int>' be equivalent}}
79
79
_ =P[t:42].other // expected-error {{static member 'subscript' cannot be used on protocol metatype 'P.Protocol'}}
80
-
// expected-error@-1 {{static subscript 'subscript(t:)' requires the types 'P' and 'G<Int>' be equivalent}}
80
+
// expected-error@-1 {{static subscript 'subscript(t:)' requires the types 'Self' and 'G<Int>' be equivalent}}
81
81
82
82
let _:S=P.property // expected-error {{static member 'property' cannot be used on protocol metatype 'P.Protocol'}}
83
-
// expected-error@-1 {{static property 'property' requires the types 'P' and 'S' be equivalent}}
83
+
// expected-error@-1 {{static property 'property' requires the types 'Self' and 'S' be equivalent}}
84
84
let _:S=P.property.other // expected-error {{static member 'property' cannot be used on protocol metatype 'P.Protocol'}}
85
-
// expected-error@-1 {{static property 'property' requires the types 'P' and 'S' be equivalent}}
85
+
// expected-error@-1 {{static property 'property' requires the types 'Self' and 'S' be equivalent}}
86
86
let _:()->S=P.fnProp // expected-error {{static member 'fnProp' cannot be used on protocol metatype 'P.Protocol'}}
87
-
// expected-error@-1 {{static property 'fnProp' requires the types 'P' and 'S' be equivalent}}
87
+
// expected-error@-1 {{static property 'fnProp' requires the types 'Self' and 'S' be equivalent}}
88
88
let _:S=P.fnProp() // expected-error {{static member 'fnProp' cannot be used on protocol metatype 'P.Protocol'}}
89
-
// expected-error@-1 {{static property 'fnProp' requires the types 'P' and 'S' be equivalent}}
89
+
// expected-error@-1 {{static property 'fnProp' requires the types 'Self' and 'S' be equivalent}}
90
90
let _:S=P.fnProp().other // expected-error {{static member 'fnProp' cannot be used on protocol metatype 'P.Protocol'}}
91
-
// expected-error@-1 {{static property 'fnProp' requires the types 'P' and 'S' be equivalent}}
91
+
// expected-error@-1 {{static property 'fnProp' requires the types 'Self' and 'S' be equivalent}}
92
92
let _:()->S=P.method // expected-error {{static member 'method' cannot be used on protocol metatype 'P.Protocol'}}
93
-
// expected-error@-1 {{referencing static method 'method()' on 'static_members_on_protocol_in_generic_context.P' requires the types 'static_members_on_protocol_in_generic_context.P' and 'S' be equivalent}}
93
+
// expected-error@-1 {{referencing static method 'method()' on 'P' requires the types 'Self' and 'S' be equivalent}}
94
94
let _:S=P.method() // expected-error {{static member 'method' cannot be used on protocol metatype 'P.Protocol'}}
95
-
// expected-error@-1 {{referencing static method 'method()' on 'static_members_on_protocol_in_generic_context.P' requires the types 'static_members_on_protocol_in_generic_context.P' and 'S' be equivalent}}
95
+
// expected-error@-1 {{referencing static method 'method()' on 'P' requires the types 'Self' and 'S' be equivalent}}
96
96
let _:S=P.method().other // expected-error {{static member 'method' cannot be used on protocol metatype 'P.Protocol'}}
97
-
// expected-error@-1 {{referencing static method 'method()' on 'static_members_on_protocol_in_generic_context.P' requires the types 'static_members_on_protocol_in_generic_context.P' and 'S' be equivalent}}
97
+
// expected-error@-1 {{referencing static method 'method()' on 'P' requires the types 'Self' and 'S' be equivalent}}
98
98
let _:G<Int>=P.genericFn(42) // expected-error {{static member 'genericFn' cannot be used on protocol metatype 'P.Protocol'}}
99
-
// expected-error@-1 {{static method 'genericFn' requires the types 'P' and 'G<Int>' be equivalent}}
99
+
// expected-error@-1 {{static method 'genericFn' requires the types 'Self' and 'G<Int>' be equivalent}}
100
100
let _:G=P.genericFn(42) // expected-error {{static member 'genericFn' cannot be used on protocol metatype 'P.Protocol'}}
101
-
// expected-error@-1 {{static method 'genericFn' requires the types 'P' and 'G<Int>' be equivalent}}
101
+
// expected-error@-1 {{static method 'genericFn' requires the types 'Self' and 'G<Int>' be equivalent}}
102
102
let _:G<String>=P.genericFn(42) // expected-error {{cannot convert value of type 'Int' to expected argument type 'String'}}
103
103
// expected-error@-1 {{static member 'genericFn' cannot be used on protocol metatype 'P.Protocol'}}
104
-
// expected-error@-2 {{static method 'genericFn' requires the types 'P' and 'G<String>' be equivalent}}
104
+
// expected-error@-2 {{static method 'genericFn' requires the types 'Self' and 'G<String>' be equivalent}}
105
105
let _:G<Int>=P.genericFn(42).other // expected-error {{static member 'genericFn' cannot be used on protocol metatype 'P.Protocol'}}
106
-
// expected-error@-1 {{static method 'genericFn' requires the types 'P' and 'G<Int>' be equivalent}}
106
+
// expected-error@-1 {{static method 'genericFn' requires the types 'Self' and 'G<Int>' be equivalent}}
107
107
let _:G<String>=P.genericFn(42).other // expected-error {{cannot convert value of type 'Int' to expected argument type 'String'}}
108
-
// expected-error@-1 {{static method 'genericFn' requires the types 'P' and 'G<String>' be equivalent}}
108
+
// expected-error@-1 {{static method 'genericFn' requires the types 'Self' and 'G<String>' be equivalent}}
109
109
// expected-error@-2 {{static member 'genericFn' cannot be used on protocol metatype 'P.Protocol'}}
110
110
let _:S=P[42] // expected-error {{static member 'subscript' cannot be used on protocol metatype 'P.Protocol'}}
111
-
// expected-error@-1 {{referencing static subscript 'subscript(_:)' on 'static_members_on_protocol_in_generic_context.P' requires the types 'static_members_on_protocol_in_generic_context.P' and 'S' be equivalent}}
111
+
// expected-error@-1 {{referencing static subscript 'subscript(_:)' on 'P' requires the types 'Self' and 'S' be equivalent}}
112
112
let _:S=P[42].other // expected-error {{static member 'subscript' cannot be used on protocol metatype 'P.Protocol'}}
113
-
// expected-error@-1 {{referencing static subscript 'subscript(_:)' on 'static_members_on_protocol_in_generic_context.P' requires the types 'static_members_on_protocol_in_generic_context.P' and 'S' be equivalent}}
113
+
// expected-error@-1 {{referencing static subscript 'subscript(_:)' on 'P' requires the types 'Self' and 'S' be equivalent}}
114
114
let _:G<Int>=P[t:42] // expected-error {{static member 'subscript' cannot be used on protocol metatype 'P.Protocol'}}
115
-
// expected-error@-1 {{static subscript 'subscript(t:)' requires the types 'P' and 'G<Int>' be equivalent}}
115
+
// expected-error@-1 {{static subscript 'subscript(t:)' requires the types 'Self' and 'G<Int>' be equivalent}}
116
116
let _:G=P[t:42] // expected-error {{static member 'subscript' cannot be used on protocol metatype 'P.Protocol'}}
117
-
// expected-error@-1 {{static subscript 'subscript(t:)' requires the types 'P' and 'G<Int>' be equivalent}}
117
+
// expected-error@-1 {{static subscript 'subscript(t:)' requires the types 'Self' and 'G<Int>' be equivalent}}
118
118
let _:G<String>=P[t:42] // expected-error {{cannot convert value of type 'Int' to expected argument type 'String'}}
119
119
// expected-error@-1 {{static member 'subscript' cannot be used on protocol metatype 'P.Protocol'}}
120
-
// expected-error@-2 {{static subscript 'subscript(t:)' requires the types 'P' and 'G<String>' be equivalent}}
120
+
// expected-error@-2 {{static subscript 'subscript(t:)' requires the types 'Self' and 'G<String>' be equivalent}}
121
121
let _:G<Int>=P[t:42].other // expected-error {{static member 'subscript' cannot be used on protocol metatype 'P.Protocol'}}
122
-
// expected-error@-1 {{static subscript 'subscript(t:)' requires the types 'P' and 'G<Int>' be equivalent}}
122
+
// expected-error@-1 {{static subscript 'subscript(t:)' requires the types 'Self' and 'G<Int>' be equivalent}}
123
123
let _:G<String>=P[t:42].other // expected-error {{cannot convert value of type 'Int' to expected argument type 'String'}}
124
124
// expected-error@-1 {{static member 'subscript' cannot be used on protocol metatype 'P.Protocol'}}
125
-
// expected-error@-2 {{static subscript 'subscript(t:)' requires the types 'P' and 'G<String>' be equivalent}}
125
+
// expected-error@-2 {{static subscript 'subscript(t:)' requires the types 'Self' and 'G<String>' be equivalent}}
0 commit comments