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
let _:SetFailureType<Int,String>=Just<Int>().setFailureType(to: _.self)
203
+
let _:SetFailureType<Int,String>=Just<Int>().setFailureType(to: _.self) // expected-error {{type placeholder not allowed here}}
204
204
let _:SetFailureType<Int,[String]>=Just<Int>().setFailureType(to:[_].self)
205
205
let _:SetFailureType<Int,(String)->Double>=Just<Int>().setFailureType(to:((_)-> _).self)
206
206
let _:SetFailureType<Int,(String,Double)>=Just<Int>().setFailureType(to:(_, _).self)
207
207
208
208
// TODO: Better error message here? Would be nice if we could point to the placeholder...
209
-
let _:SetFailureType<Int,String>=Just<Int>().setFailureType(to: _.self).setFailureType(to:String.self) // expected-error {{generic parameter 'T' could not be inferred}}
209
+
let _:SetFailureType<Int,String>=Just<Int>().setFailureType(to: _.self).setFailureType(to:String.self) // expected-error {{type placeholder not allowed here}} expected-error {{generic parameter 'T' could not be inferred}}
210
210
211
211
let _:(_)=0asInt
212
212
let _:Int=0as(_)
@@ -225,7 +225,7 @@ _ = (1...10)
225
225
x.boolValue ? intValue :0
226
226
}
227
227
228
-
let _:SetFailureType<Int,String>=Just<Int>().setFailureType(to: _.self).setFailureType(to:String.self) // expected-error {{generic parameter 'T' could not be inferred}}
228
+
let _:SetFailureType<Int,String>=Just<Int>().setFailureType(to: _.self).setFailureType(to:String.self) // expected-error {{type placeholder not allowed here}} expected-error {{generic parameter 'T' could not be inferred}}
229
229
230
230
// N.B. The parallel structure of the annotation and inferred default
231
231
// initializer types is all wrong. Plus, we do not trust
0 commit comments