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
classProgram{staticvoidF1<T>(Tt,objecto){}staticvoidF2<T>(Tt,refobjecto){}staticvoidMain(){_=new[]{F1<object>,F1<string>};// ok_=new[]{F2<object>,F2<string>};// error CS0826: No best type found for implicitly-typed array}}
Expected: Compiler infers a common delegate signature void *(object, ref object) for the second array.
Actual: (9,13): error CS0826: No best type found for implicitly-typed array
The type parameters for synthesized delegate types should have in variance for parameters passed by value and out variance for out parameters and return type.
Compile:
Expected: Compiler infers a common delegate signature
void *(object, ref object)
for the second array.Actual:
(9,13): error CS0826: No best type found for implicitly-typed array
Relates to test plan #52192
The text was updated successfully, but these errors were encountered: