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
// FIXME: Type witness resolution success is order-dependent.
107
-
protocolSR_12707_FIXME_P1{
108
-
associatedtypeA
109
-
}
110
-
protocolSR_12707_FIXME_P2:SR_12707_FIXME_P1{
111
-
associatedtypeB:SR_12707_C<(A,Self)>=SR_12707_C<(A,Self)> // expected-note {{default type 'associated_type.SR_12707_C<(associated_type.SR_12707_FIXME_Conform_P2.A, associated_type.SR_12707_FIXME_Conform_P2)>' (aka 'SR_12707_C<(Never, SR_12707_FIXME_Conform_P2)>') for associated type 'B' (from protocol 'SR_12707_FIXME_P2') does not inherit from 'associated_type.SR_12707_C<(associated_type.SR_12707_FIXME_Conform_P2.A, associated_type.SR_12707_FIXME_Conform_P2)>'}}
112
-
}
113
-
structSR_12707_FIXME_Conform_P2:SR_12707_FIXME_P2{ // expected-error {{type 'SR_12707_FIXME_Conform_P2' does not conform to protocol 'SR_12707_FIXME_P2'}}
114
-
typealiasA=Never
115
-
}
116
-
117
-
// FIXME: Type witness resolution success is order-dependent.
97
+
// FIXME: resolveTypeWitnessViaLookup must not happen independently in the
98
+
// general case.
118
99
protocolSR_12707_FIXME_P3{
119
100
associatedtypeA:SR_12707_C<B> // expected-note {{protocol requires nested type 'A'; do you want to add it?}}
typealiasA=SR_12707_C<B> // expected-note {{possibly intended match 'SR_12707_FIXME_Conform_P3.A' (aka 'SR_12707_C<Never>') does not inherit from 'SR_12707_C<SR_12707_FIXME_Conform_P3.B>'}}
124
105
typealiasB=Never
125
106
}
107
+
108
+
// FIXME: Associated type inference via value witnesses should consider
109
+
// tentative witnesses when checking a candidate.
110
+
protocolSR_12707_FIXME_P4{
111
+
associatedtypeX=Never
112
+
113
+
associatedtypeA:SR_12707_C<X> // expected-note {{unable to infer associated type 'A' for protocol 'SR_12707_FIXME_P4'}}
114
+
func foo(arg:A)
115
+
}
116
+
structSR_12707_FIXME_Conform_P4:SR_12707_FIXME_P4{ // expected-error {{type 'SR_12707_FIXME_Conform_P4' does not conform to protocol 'SR_12707_FIXME_P4'}}
117
+
func foo(arg:SR_12707_C<Never>){} // expected-note {{candidate would match and infer 'A' = 'SR_12707_C<Never>' if 'SR_12707_C<Never>' inherited from 'SR_12707_C<SR_12707_FIXME_Conform_P4.X>'}}
118
+
}
119
+
120
+
// Abstract type witnesses.
121
+
protocolSR_12707_P5a{
122
+
associatedtypeX=Never
123
+
124
+
associatedtypeA:SR_12707_C<X>
125
+
associatedtypeB:SR_12707_C<X>
126
+
}
127
+
protocolSR_12707_P5b:SR_12707_P5awhere B ==SR_12707_C<X>{
0 commit comments