319 references to ERR_CantInferMethTypeArgs
Microsoft.CodeAnalysis.CSharp (2)
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
758
ErrorCode.
ERR_CantInferMethTypeArgs
,
Errors\ErrorFacts.cs (1)
868
or ErrorCode.
ERR_CantInferMethTypeArgs
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (17)
CodeGen\CodeGenDeconstructTests.cs (2)
2525
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "new C()").WithArguments("Extension.Deconstruct<T>(C, out int, out T)").WithLocation(8, 18),
2624
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "new C1()").WithArguments("C1.Deconstruct<T>(out int, out T)").WithLocation(9, 18),
CodeGen\CodeGenExprLambdaTests.cs (1)
4053
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "GenericMethod").WithArguments("MemberInitializerTest.GenericMethod<T>()").WithLocation(9, 29));
CodeGen\CodeGenForEachTests.cs (2)
3416
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "new object()").WithArguments("Extensions.GetEnumerator<T>(object)").WithLocation(8, 27),
3447
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "new object()").WithArguments("Extensions.GetEnumerator<T>(object, params T[])").WithLocation(8, 27),
CodeGen\CodeGenFunctionPointersTests.cs (2)
3857
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "C.M1").WithArguments("C.M1<T>(int)").WithLocation(9, 38),
3860
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "C.M2").WithArguments("C.M2<T>()").WithLocation(10, 35)
CodeGen\CodeGenTupleTest.cs (9)
9812
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test1").WithArguments("C.Test1<T>(ref T, T)").WithLocation(10, 9)
9849
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test3").WithArguments("C.Test3<T>(ref T, ref T)").WithLocation(17, 18)
10031
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test1").WithArguments("C.Test1<T>(ref T, T, T, T)").WithLocation(10, 18)
10270
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test1").WithArguments("C.Test1<T, U>((T, U)?, (T, U?))").WithLocation(7, 9),
10273
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test1").WithArguments("C.Test1<T, U>((T, U)?, (T, U?))").WithLocation(8, 9),
10276
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test1").WithArguments("C.Test1<T, U>((T, U)?, (T, U?))").WithLocation(9, 9)
18827
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test").WithArguments("Program.Test<T>(System.Action<T>, System.Action<T>)").WithLocation(22, 9),
19581
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M2").WithArguments("C.M2<T>(System.Func<T>)").WithLocation(6, 18)
26128
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("C.M1<T1, T2, T3, T4, T5, T6, T7, TRest>(System.ValueTuple<System.Func<T1>, System.Func<T2>, System.Func<T3>, System.Func<T4>, System.Func<T5>, System.Func<T6>, System.Func<T7>, TRest>)").WithLocation(6, 9)
CodeGen\UnsafeTests.cs (1)
5366
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "new Fixable(1)").WithArguments("Fixable.GetPinnableReference<T>()").WithLocation(6, 25),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (65)
FirstClassSpanTests.cs (10)
8923
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("C.M1<T>(System.Span<T>, T)").WithLocation(4, 41));
8955
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("C.M1<T>(System.Span<T[]>, T)").WithLocation(4, 43));
9002
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("C.M1<T>(System.Span<T>, T)").WithLocation(4, 37));
9034
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("C.M1<T>(T[])").WithLocation(4, 28));
9096
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("C.M1<T>(System.ReadOnlySpan<T>, T)").WithLocation(4, 34));
9167
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("C.M1<T>(I<System.ReadOnlySpan<T>>)").WithLocation(4, 30));
9244
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("C.M1<T>(out System.ReadOnlySpan<T[]>, T)").WithLocation(4, 55));
9261
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("C.M1<T>(System.ReadOnlySpan<T>, T)").WithLocation(4, 46));
9293
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("C.M1<T>(System.Span<T>)").WithLocation(4, 36));
9355
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("C.M1<T>(System.ReadOnlySpan<T>, T)").WithLocation(4, 38));
Semantics\CollectionExpressionTests.cs (45)
401
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T)").WithLocation(5, 9),
404
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T)").WithLocation(6, 9));
425
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T)").WithLocation(5, 9),
428
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T)").WithLocation(6, 9));
3410
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "AsArray").WithArguments("Program.AsArray<T>(T[])").WithLocation(9, 9),
3536
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "AsCollection").WithArguments("Program.AsCollection<T>(S<T>)").WithLocation(15, 13),
3684
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F0").WithArguments("Program.F0<T>(T[], T)").WithLocation(8, 17),
3687
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F1").WithArguments("Program.F1<T>(T[], T[])").WithLocation(9, 17),
3690
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F2").WithArguments("Program.F2<T>(T[][], T[][])").WithLocation(10, 17));
3732
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F1").WithArguments("Program.F1<T>(T[], T[])").WithLocation(7, 17),
3735
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F2").WithArguments("Program.F2<T>(T[][], T[][])").WithLocation(8, 17));
3773
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T[][])").WithLocation(6, 17));
3854
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F1").WithArguments("Program.F1<T>(T[], T[])").WithLocation(7, 17),
3857
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F2").WithArguments("Program.F2<T>(T[][], T[][])").WithLocation(8, 17));
3907
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F1").WithArguments("Program.F1<T>(System.Span<T>, System.ReadOnlySpan<T>)").WithLocation(9, 17),
3910
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F2").WithArguments("Program.F2<T>(System.Span<T[]>, System.ReadOnlySpan<System.Collections.Generic.List<T>>)").WithLocation(10, 17));
3931
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T)").WithLocation(6, 9),
3934
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T)").WithLocation(7, 9));
3955
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T[*,*])").WithLocation(6, 9),
4069
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T[])").WithLocation(6, 9),
4075
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T[])").WithLocation(8, 9));
4201
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "CollectionResult").WithArguments("Program.CollectionResult<T>(System.Func<T[]>)").WithLocation(20, 9));
4249
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F1").WithArguments("Program.F1<T>(System.Collections.Generic.List<System.Func<T>>)").WithLocation(9, 17),
4252
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F1").WithArguments("Program.F1<T>(System.Collections.Generic.List<System.Func<T>>)").WithLocation(10, 17));
4348
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F2").WithArguments("Program.F2<T>(T[], ref T)").WithLocation(9, 18),
4351
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F3").WithArguments("Program.F3<T>(T[], in T)").WithLocation(10, 19),
4354
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F4").WithArguments("Program.F4<T>(T[], out T)").WithLocation(11, 18));
4378
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(System.Func<T[]>)").WithLocation(7, 17),
4381
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(System.Func<T[]>)").WithLocation(9, 17));
7899
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "1").WithArguments("Extensions.Add<T>(ref MyCollection<T>, out T)").WithLocation(16, 42),
7934
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "1").WithArguments("Extensions.Add<T>(ref MyCollection<T>, ref T)").WithLocation(16, 42),
32796
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Method").WithArguments("C.Method<T>(System.Func<T>[])").WithLocation(7, 9),
32799
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Method2").WithArguments("C.Method2<T>(System.Func<T>)").WithLocation(8, 9)
32825
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Method").WithArguments("C.Method<T>(System.Func<T>[])").WithLocation(7, 9),
32828
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Method2").WithArguments("C.Method2<T>(System.Func<T>)").WithLocation(8, 9)
33344
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "SequenceEqual").WithArguments("System.MemoryExtensions.SequenceEqual<T>(System.ReadOnlySpan<T>, System.ReadOnlySpan<T>)").WithLocation(9, 20)
41359
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "null").WithArguments("MyCollection<object>.Add<U>(U)").WithLocation(5, 35));
41465
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "null").WithArguments("Extensions.Add<T, U>(MyCollection<T>, U)").WithLocation(5, 35));
41546
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "null").WithArguments("Extensions.Add<T>(MyCollection<object>, T)").WithLocation(5, 35));
41609
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "x").WithArguments("MyCollection<object>.Add<U>(System.Func<object, U>)").WithLocation(7, 35),
41612
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "y").WithArguments("MyCollection<object>.Add<U>(System.Func<object, U>)").WithLocation(7, 40),
41615
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "null").WithArguments("MyCollection<object>.Add<U>(System.Func<object, U>)").WithLocation(7, 43));
41667
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "x").WithArguments("Extensions.Add<T, U>(MyCollection<T>, System.Func<T, U>)").WithLocation(7, 35),
41670
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "y").WithArguments("Extensions.Add<T, U>(MyCollection<T>, System.Func<T, U>)").WithLocation(7, 40),
41673
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "null").WithArguments("Extensions.Add<T, U>(MyCollection<T>, System.Func<T, U>)").WithLocation(7, 43));
Semantics\ExtensionTests.cs (2)
21233
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "new C()").WithArguments("E.extension(C).GetEnumerator<T>()").WithLocation(3, 19),
29378
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("E.extension(object).M<T>()").WithLocation(1, 8));
Semantics\OutVarTests.cs (6)
32424
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "TakeOutParam").WithArguments("H.TakeOutParam<T>(out T)").WithLocation(2, 3)
32860
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "TakeOutParam").WithArguments("X.TakeOutParam<T>(out T)").WithLocation(6, 9)
32889
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "TakeOutParam").WithArguments("X.TakeOutParam<T>(out T, T)").WithLocation(7, 9),
32892
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "TakeOutParam").WithArguments("X.TakeOutParam<T>(out T, T)").WithLocation(9, 9)
33399
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("C.M<T>(out T)").WithLocation(10, 9),
33402
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("C.M<T>(out T)").WithLocation(11, 9)
Semantics\ParamsCollectionTests.cs (1)
12947
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test").WithArguments("Program.Test<T>(System.Linq.Expressions.Expression<T>)").WithLocation(9, 9)
Semantics\RecordTests.cs (1)
24078
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(System.IEquatable<T>)").WithLocation(11, 9));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (207)
Semantics\BindingAwaitTests.cs (3)
1575
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "await new A()").WithArguments("A.GetAwaiter<T>()"),
1578
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "await new B()").WithArguments("MyExtensions.GetAwaiter<T>(B)")
2455
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "await new A()").WithArguments("Awaiter.GetResult<T>()")
Semantics\BindingTests.cs (1)
3841
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "ExtensionMethod1").WithArguments("FooExtensions.ExtensionMethod1<T>(object)").WithLocation(25, 42),
Semantics\DelegateTypeTests.cs (91)
2817
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "new C().M").WithArguments("C.M<T>()").WithLocation(1, 19),
2827
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "new C().M").WithArguments("C.M<T>()").WithLocation(1, 19),
3270
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test").WithArguments("Program.Test<T>(System.Func<T, bool>)").WithLocation(1, 15),
3273
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test3").WithArguments("Program.Test3<T>(Predicate<T>)").WithLocation(3, 15));
5451
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F0").WithArguments("Program.F0<T>(System.Action<T>)").WithLocation(10, 9)
5485
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(System.Action<T>)").WithLocation(10, 9)
5795
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("Program.M<T>(T, System.Func<object>)").WithLocation(9, 9),
5798
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("Program.M<T>(T, System.Func<object>)").WithLocation(10, 9));
5891
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("Program.M<T>(object, T)").WithLocation(9, 9),
5897
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("Program.M<T>(object, T)").WithLocation(11, 9));
5930
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("Program.M<T, U>(System.Func<T>, U)").WithLocation(9, 9),
5933
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("Program.M<T, U>(System.Func<T>, U)").WithLocation(11, 9));
8311
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F1").WithArguments("Program.F1<T>(T)").WithLocation(9, 16),
8314
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F2").WithArguments("Program.F2<T>(T)").WithLocation(10, 16));
8418
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(9, 16),
8421
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(10, 16));
8451
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(9, 16),
8454
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(10, 16));
8489
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("Program.M<T>(T, T)").WithLocation(10, 18),
8492
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("Program.M<T>(T, T)").WithLocation(11, 18),
8495
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("Program.M<T>(T, T)").WithLocation(12, 18));
8531
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("Program.M<T>(T, T)").WithLocation(8, 18),
8534
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("Program.M<T>(T, T)").WithLocation(9, 18),
8537
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("Program.M<T>(T, T)").WithLocation(10, 18),
8540
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("Program.M<T>(T, T)").WithLocation(11, 18));
8640
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(7, 16),
8643
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(8, 16));
8846
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F1").WithArguments("Program.F1<T>(in T, T)").WithLocation(10, 16),
8849
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F2").WithArguments("Program.F2<T>(T, in T)").WithLocation(11, 16)
8865
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F2").WithArguments("Program.F2<T>(T, in T)").WithLocation(11, 16));
8887
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(7, 16));
8914
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(7, 16),
8917
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(8, 16),
8960
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(9, 16),
8963
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(10, 16));
8991
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(7, 16));
8997
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(7, 16));
9021
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(8, 16));
9028
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(8, 16));
9050
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(7, 16));
9056
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(7, 16));
9079
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(8, 16));
9085
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(8, 16));
9109
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(7, 16),
9112
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(8, 16),
9124
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(7, 16),
9127
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(8, 16));
9153
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(9, 16),
9156
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(10, 16));
9163
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(9, 16),
9166
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(T, T)").WithLocation(10, 16));
9187
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F1").WithArguments("Program.F1<T>(T)").WithLocation(8, 12));
9194
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F2").WithArguments("Program.F2<T>(D<T>)").WithLocation(8, 9));
9215
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F1").WithArguments("Program.F1<T>(T)").WithLocation(8, 12));
9222
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F2").WithArguments("Program.F2<T>(System.Linq.Expressions.Expression<T>)").WithLocation(8, 9));
9254
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("Program.M1<T>(T)").WithLocation(10, 18),
9257
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M2").WithArguments("Program.M2<T>(T, T)").WithLocation(11, 18),
9260
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M2").WithArguments("Program.M2<T>(T, T)").WithLocation(12, 18),
9263
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("Program.M1<T>(T)").WithLocation(13, 18),
9266
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M2").WithArguments("Program.M2<T>(T, T)").WithLocation(14, 18),
9269
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M2").WithArguments("Program.M2<T>(T, T)").WithLocation(15, 18));
9275
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("Program.M1<T>(T)").WithLocation(10, 18),
9278
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("Program.M1<T>(T)").WithLocation(13, 18));
9467
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F1").WithArguments("Program.F1<T>(System.Func<T, T>, T)").WithLocation(9, 9),
9473
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F2").WithArguments("Program.F2<T>(System.Linq.Expressions.Expression<System.Func<T, T>>, T)").WithLocation(10, 9),
9482
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F1").WithArguments("Program.F1<T>(System.Func<T, T>, T)").WithLocation(9, 9),
9485
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F2").WithArguments("Program.F2<T>(System.Linq.Expressions.Expression<System.Func<T, T>>, T)").WithLocation(10, 9)
9565
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F1").WithArguments("Program.F1<T>(System.Func<T, T>)").WithLocation(16, 9),
9568
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F2").WithArguments("Program.F2<T>(System.Func<T, I<T>>)").WithLocation(17, 9),
9571
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F3").WithArguments("Program.F3<T>(System.Func<I<T>, T>)").WithLocation(18, 9),
9574
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F4").WithArguments("Program.F4<T>(System.Func<I<T>, I<T>>)").WithLocation(19, 9),
9577
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F5").WithArguments("Program.F5<T>(System.Linq.Expressions.Expression<System.Func<T, T>>)").WithLocation(20, 9),
9580
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F6").WithArguments("Program.F6<T>(System.Linq.Expressions.Expression<System.Func<T, I<T>>>)").WithLocation(21, 9),
9583
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F7").WithArguments("Program.F7<T>(System.Linq.Expressions.Expression<System.Func<I<T>, T>>)").WithLocation(22, 9),
9586
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F8").WithArguments("Program.F8<T>(System.Linq.Expressions.Expression<System.Func<I<T>, I<T>>>)").WithLocation(23, 9));
9621
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F1").WithArguments("Program.F1<T>(System.Func<T, T>, System.Func<T, T>)").WithLocation(10, 9),
9636
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F2").WithArguments("Program.F2<T>(System.Linq.Expressions.Expression<System.Func<T, T>>, System.Linq.Expressions.Expression<System.Func<T, T>>)").WithLocation(12, 9),
9648
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F1").WithArguments("Program.F1<T>(System.Func<T, T>, System.Func<T, T>)").WithLocation(10, 9),
9651
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F2").WithArguments("Program.F2<T>(System.Linq.Expressions.Expression<System.Func<T, T>>, System.Linq.Expressions.Expression<System.Func<T, T>>)").WithLocation(12, 9)
9882
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test3").WithArguments("Test3<T>(System.Func<System.Func<T>>)").WithLocation(11, 1),
9885
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test4").WithArguments("Test4<T>(System.Func<System.Linq.Expressions.Expression<System.Func<T>>>)").WithLocation(12, 1)
9979
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("Program.M1<T>(System.Func<T>)").WithLocation(11, 9),
9982
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M2").WithArguments("Program.M2<T>(System.Linq.Expressions.Expression<System.Func<T>>)").WithLocation(12, 9),
9985
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("Program.M1<T>(System.Func<T>)").WithLocation(13, 9),
9988
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M2").WithArguments("Program.M2<T>(System.Linq.Expressions.Expression<System.Func<T>>)").WithLocation(14, 9)
10027
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("Program.M1<T>(System.Func<System.Func<T>>)").WithLocation(12, 9),
10030
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M2").WithArguments("Program.M2<T>(System.Func<System.Linq.Expressions.Expression<System.Func<T>>>)").WithLocation(13, 9),
10033
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M3").WithArguments("Program.M3<T>(System.Linq.Expressions.Expression<System.Func<System.Func<T>>>)").WithLocation(14, 9),
10036
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("Program.M1<T>(System.Func<System.Func<T>>)").WithLocation(15, 9),
10039
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M2").WithArguments("Program.M2<T>(System.Func<System.Linq.Expressions.Expression<System.Func<T>>>)").WithLocation(16, 9),
10042
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M3").WithArguments("Program.M3<T>(System.Linq.Expressions.Expression<System.Func<System.Func<T>>>)").WithLocation(17, 9)
Semantics\DynamicTests.cs (1)
3974
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Goo").WithArguments("Program.Goo<T>(System.Func<T, T>)").WithLocation(10, 33)
Semantics\FunctionPointerTests.cs (37)
1657
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("C.M1<T>(delegate*<T, void>, delegate*<T, void>)").WithLocation(13, 9)
1690
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("C.M1<T>(delegate*<delegate*<T, void>, void>, delegate*<delegate*<T, void>, void>)").WithLocation(13, 9)
1723
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("C.M1<T>(delegate*<delegate*<T>, void>, delegate*<delegate*<T>, void>)").WithLocation(13, 9)
1752
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("C.M1<T>(delegate*<T, void>, delegate*<T, void>)").WithLocation(9, 9)
1817
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("C.M1<T>(delegate*<T>, delegate*<T>)").WithLocation(13, 9)
1850
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("C.M1<T>(delegate*<delegate*<T, void>>, delegate*<delegate*<T, void>>)").WithLocation(13, 9)
1883
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("C.M1<T>(delegate*<delegate*<T>>, delegate*<delegate*<T>>)").WithLocation(13, 9)
1912
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("C.M1<T>(delegate*<T>, delegate*<T>)").WithLocation(9, 9)
2204
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "SubstitutedStatic2").WithArguments("D.SubstitutedStatic2<TStatic>(TStatic, TStatic)").WithLocation(18, 9),
2207
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "SubstitutedStatic2").WithArguments("D.SubstitutedStatic2<TStatic>(TStatic, TStatic)").WithLocation(19, 9),
2216
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "SubstitutedStatic2").WithArguments("D.SubstitutedStatic2<TStatic>(TStatic, TStatic)").WithLocation(27, 9),
2219
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "SubstitutedStatic2").WithArguments("D.SubstitutedStatic2<TStatic>(TStatic, TStatic)").WithLocation(28, 9)
2273
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "SubstitutedStatic2").WithArguments("C.SubstitutedStatic2<TStatic>(TStatic, TStatic)").WithLocation(10, 9),
2276
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "SubstitutedStatic2").WithArguments("C.SubstitutedStatic2<TStatic>(TStatic, TStatic)").WithLocation(15, 9)
2334
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "SubstitutedStatic2").WithArguments("C.SubstitutedStatic2<TStatic>(TStatic, TStatic)").WithLocation(11, 9),
2337
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "SubstitutedStatic2").WithArguments("C.SubstitutedStatic2<TStatic>(TStatic, TStatic)").WithLocation(12, 9),
2340
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "SubstitutedStatic2").WithArguments("C.SubstitutedStatic2<TStatic>(TStatic, TStatic)").WithLocation(13, 9),
2343
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "SubstitutedStatic2").WithArguments("C.SubstitutedStatic2<TStatic>(TStatic, TStatic)").WithLocation(19, 9),
2346
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "SubstitutedStatic2").WithArguments("C.SubstitutedStatic2<TStatic>(TStatic, TStatic)").WithLocation(20, 9),
2349
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "SubstitutedStatic2").WithArguments("C.SubstitutedStatic2<TStatic>(TStatic, TStatic)").WithLocation(21, 9)
2758
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test").WithArguments("Test<T1, T2>(T2, delegate*<T1, T2>)").WithLocation(4, 5),
2785
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test1").WithArguments("Test1<T1, T2>(T1, delegate*<T1, T2>)").WithLocation(4, 5),
2788
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test2").WithArguments("Test2<T1, T2>(T2, delegate*<T1, T2>)").WithLocation(5, 5),
2817
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test1").WithArguments("Test1<T1, T2>(T1, delegate*<T1, T2>)").WithLocation(4, 5),
2820
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test2").WithArguments("Test2<T1, T2>(T2, delegate*<T1, T2>)").WithLocation(5, 5),
2850
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test1").WithArguments("Test1<T1, T2>(T1, System.Func<T1, T2>)").WithLocation(5, 5),
2853
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test2").WithArguments("Test2<T1, T2>(T2, System.Func<T1, T2>)").WithLocation(6, 5),
2883
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test1").WithArguments("Test1<T1>(delegate* unmanaged<T1, void>[])").WithLocation(5, 5),
2889
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test1").WithArguments("Test1<T1>(delegate* unmanaged<T1, void>[])").WithLocation(8, 5),
2916
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test1").WithArguments("Test1<T1, T2>(delegate*<T1, T2>[])").WithLocation(5, 5),
2922
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test1").WithArguments("Test1<T1, T2>(delegate*<T1, T2>[])").WithLocation(8, 5),
2981
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test").WithArguments("Test<T1, T2>(delegate* unmanaged[Cdecl]<T1, T2>)").WithLocation(5, 5),
3008
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test").WithArguments("Test<T1, T2>(delegate*<T1, T2>)").WithLocation(5, 5),
3014
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test").WithArguments("Test<T1, T2>(delegate*<T1, T2>)").WithLocation(8, 5),
3038
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test").WithArguments("Test<T1, T2>(delegate*<delegate* unmanaged[Cdecl]<T1, T2>, void>)").WithLocation(5, 5),
3065
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test").WithArguments("Test<T1, T2>(delegate*<delegate*<T1, T2>, void>)").WithLocation(5, 5),
3071
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Test").WithArguments("Test<T1, T2>(delegate*<delegate*<T1, T2>, void>)").WithLocation(8, 5),
Semantics\GenericConstraintsTests.cs (4)
3261
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Unmanaged").WithArguments("C.Unmanaged<T>(T*)").WithLocation(14, 9),
3264
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Unmanaged").WithArguments("C.Unmanaged<T>(T*)").WithLocation(15, 9),
3267
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "UnmanagedWithInterface").WithArguments("C.UnmanagedWithInterface<T>(T*)").WithLocation(18, 9),
3270
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "UnmanagedWithInterface").WithArguments("C.UnmanagedWithInterface<T>(T*)").WithLocation(19, 9),
Semantics\ImplicitObjectCreationTests.cs (5)
1349
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("C.M<T>(System.Func<bool, T>)").WithLocation(12, 9)
2247
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("C.F<T>(System.Threading.Tasks.Task<T>)").WithLocation(8, 9)
2270
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("C.F<T>(System.Threading.Tasks.Task<T>)").WithLocation(8, 9),
2448
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("C.M<T>(T)").WithLocation(6, 9)
2469
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("C.M<T>(T, T)").WithLocation(6, 9)
Semantics\InterpolationTests.cs (3)
5229
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("C.M<T>(T, T)").WithLocation(2, 3),
5232
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("C.M<T>(T, T)").WithLocation(3, 3)
5255
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("C.M<T>(T, System.Func<T>)").WithLocation(3, 3)
Semantics\LambdaTests.cs (6)
6028
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(System.Func<bool, T>)").WithLocation(13, 9),
6031
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(System.Func<bool, T>)").WithLocation(14, 9)
6106
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(System.Func<T>, System.Func<T>)").WithLocation(11, 9),
6115
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(System.Func<T>, System.Func<T>)").WithLocation(12, 9),
6127
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(System.Func<T>, System.Func<T>)").WithLocation(11, 9),
6130
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("Program.F<T>(System.Func<T>, System.Func<T>)").WithLocation(12, 9));
Semantics\MethodTypeInferenceTests.cs (3)
493
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Apply").WithArguments("C.Apply<T>(C.F<T>)").WithLocation(8, 7));
516
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Goo").WithArguments("C.Goo<T>(ref T[])"));
1017
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("Test.M<T>(T)"),
Semantics\MultiDimensionalArrayTests.cs (6)
552
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("C.M1<T>(T[])").WithLocation(10, 9),
555
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M2").WithArguments("C.M2<T>(T, T)").WithLocation(13, 9),
558
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M2").WithArguments("C.M2<T>(T, T)").WithLocation(14, 9),
561
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M3").WithArguments("C.M3<T>(System.Collections.Generic.IList<T>)").WithLocation(16, 9),
564
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("Test.M1<T>(T[*])").WithLocation(18, 14),
573
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M2").WithArguments("Test.M2<T>(T[], T[*])").WithLocation(23, 14)
Semantics\NameOfTests.cs (1)
2343
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Method").WithArguments("C.Method<T>()").WithLocation(4, 18)
Semantics\NativeIntegerTests.cs (10)
14276
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F0").WithArguments("Program.F0<T>(System.Func<T>)").WithLocation(15, 9),
14279
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F0").WithArguments("Program.F0<T>(System.Func<T>)").WithLocation(16, 9));
14316
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F0").WithArguments("Program.F0<T>(System.Func<T>)").WithLocation(10, 9),
14325
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F0").WithArguments("Program.F0<T>(System.Func<T>)").WithLocation(16, 9));
14382
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F0").WithArguments("Program.F0<T>(T, T)").WithLocation(12, 9),
14385
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F0").WithArguments("Program.F0<T>(T, T)").WithLocation(13, 9),
14394
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F0").WithArguments("Program.F0<T>(T, T)").WithLocation(23, 9),
14397
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F0").WithArguments("Program.F0<T>(T, T)").WithLocation(24, 9),
14406
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F0").WithArguments("Program.F0<T>(T, T)").WithLocation(34, 9),
14409
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F0").WithArguments("Program.F0<T>(T, T)").WithLocation(35, 9),
Semantics\NullableReferenceTypesTests.cs (6)
4241
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Copy").WithArguments("Program.Copy<T, U>(T, U)").WithLocation(7, 18),
47126
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F1").WithArguments("Program.F1<T>(T, ref T)").WithLocation(86, 9),
47138
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F1").WithArguments("Program.F1<T>(T, ref T)").WithLocation(95, 9),
94490
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("C.F<T>(T)").WithLocation(9, 9),
110018
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "CopyOutInherit").WithArguments("C.CopyOutInherit<T1, T2>(T1, out T2)").WithLocation(29, 9),
157166
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Select").WithArguments("System.Linq.Enumerable.Select<TSource, TResult>(System.Collections.Generic.IEnumerable<TSource>, System.Func<TSource, TResult>)").WithLocation(14, 11)
Semantics\ObjectAndCollectionInitializerTests.cs (1)
1561
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "1").WithArguments("Gen<int>.Add<U>(int)").WithLocation(21, 45)
Semantics\OverloadResolutionTests.cs (20)
1249
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "J").WithArguments("C.J<T>(T, T)").WithLocation(8, 9));
1527
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Goo").WithArguments("C.Goo<T>(params T[])").WithLocation(6, 9));
6375
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M3").WithArguments("AggTest.B1.M3<S, T>(G1<G2<S, T>>)"),
6378
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M3").WithArguments("AggTest.B1.M3<S, T>(G1<G2<S, T>>)"),
6381
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M3").WithArguments("AggTest.B1.M3<S, T>(G1<G2<S, T>>)"),
6384
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M3").WithArguments("AggTest.B1.M3<S, T>(G1<G2<S, T>>)"),
6387
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M3").WithArguments("AggTest.B1.M3<S, T>(G1<G2<S, T>>)"),
6390
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M3").WithArguments("AggTest.B1.M3<S, T>(G1<G2<S, T>>)"),
6396
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M3").WithArguments("AggTest.B1.M3<S, T>(G1<G2<S, T>>)"),
6399
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M3").WithArguments("AggTest.B1.M3<S, T>(G1<G2<S, T>>)"));
9298
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Assert").WithArguments("Test.Assert<T>(T, T)").WithLocation(17, 9),
9301
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Assert").WithArguments("Test.Assert<T>(T, T)").WithLocation(18, 9)
11302
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("Program.M1<T>(in T, in T)").WithLocation(15, 9),
11308
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("Program.M1<T>(in T, in T)").WithLocation(17, 9),
11317
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("Program.M1<T>(in T, in T)").WithLocation(22, 9),
11320
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("Program.M1<T>(in T, in T)").WithLocation(23, 9)
11397
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Method").WithArguments("Program.Method<T>(in (T arg1, T arg2))").WithLocation(15, 9),
11406
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Method").WithArguments("Program.Method<T>(in (T arg1, T arg2))").WithLocation(17, 9),
11451
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Method").WithArguments("Program.Method<T>(in T)").WithLocation(11, 9));
11477
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M1").WithArguments("Program.M1<T>(T, T)").WithLocation(13, 9)
Semantics\RawInterpolationTests_Handler.cs (3)
3438
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("C.M<T>(T, T)").WithLocation(2, 3),
3441
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("C.M<T>(T, T)").WithLocation(3, 3));
3463
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("C.M<T>(T, System.Func<T>)").WithLocation(3, 3));
Semantics\SemanticAnalyzerTests.cs (1)
473
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "Generic").WithArguments("P.Generic<T>()").WithLocation(118, 11),
Semantics\SemanticErrorTests.cs (2)
10637
new ErrorDescription[] { new ErrorDescription { Code = (int)ErrorCode.
ERR_CantInferMethTypeArgs
, Line = 11, Column = 11 } });
10657
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "(D<int>)GenericMethod").WithArguments("MemberInitializerTest.GenericMethod<T>()")
Semantics\TargetTypedDefaultTests.cs (3)
696
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F").WithArguments("C.F<T>(System.Threading.Tasks.Task<T>)").WithLocation(8, 9)
950
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("C.M<T>(T)").WithLocation(6, 9)
971
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M").WithArguments("C.M<T>(T, T)").WithLocation(6, 9)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (28)
Symbols\ConversionTests.cs (12)
1789
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F1").WithArguments("Test.F1<R>(G1<R>)"),
1798
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "FS2").WithArguments("Test.FS2<R, S>(GS2<R, S>)"),
1804
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "FS3").WithArguments("Test.FS3<R, S, T>(GS3<R, S, T>)"),
1819
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "FC2").WithArguments("Test.FC2<R, S>(GC2<R, S>)"),
1825
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "FC3").WithArguments("Test.FC3<R, S, T>(GC3<R, S, T>)"),
1834
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F1").WithArguments("Test.F1<R>(G1<R>)"),
1837
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F1").WithArguments("Test.F1<R>(G1<R>)"),
1840
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "F1").WithArguments("Test.F1<R>(G1<R>)"),
1843
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "FC2").WithArguments("Test.FC2<R, S>(GC2<R, S>)"),
1846
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "FC2").WithArguments("Test.FC2<R, S>(GC2<R, S>)"),
1849
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "FC2").WithArguments("Test.FC2<R, S>(GC2<R, S>)"),
1852
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "FC3").WithArguments("Test.FC3<R, S, T>(GC3<R, S, T>)")
Symbols\ExtensionMethodTests.cs (2)
687
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M4").WithArguments("N1.N2.C.M4<T>(T, int)").WithLocation(13, 22),
705
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "M4").WithArguments("N1.N2.C.M4<T>(T, int)").WithLocation(44, 22),
Symbols\Source\DelegateTests.cs (14)
604
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "FCT").WithArguments("DelegateTest.FCT<T>(C<T>)").WithLocation(45, 21),
607
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "PT").WithArguments("DelegateTest.PT<T>(params T[])").WithLocation(46, 21),
619
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "PST").WithArguments("DelegateTest.PST<S, T>(S, params T[])").WithLocation(51, 23),
625
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "FTT").WithArguments("DelegateTest.FTT<T>(T, T)").WithLocation(54, 23),
631
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "PST").WithArguments("DelegateTest.PST<S, T>(S, params T[])").WithLocation(56, 23),
637
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "FTT").WithArguments("DelegateTest.FTT<T>(T, T)").WithLocation(59, 23),
646
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "PST").WithArguments("DelegateTest.PST<S, T>(S, params T[])").WithLocation(62, 23),
652
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "FCT").WithArguments("DelegateTest.FCT<T>(C<T>)").WithLocation(65, 23),
658
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "FTT").WithArguments("DelegateTest.FTT<T>(T, T)").WithLocation(68, 25),
664
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "FTT").WithArguments("DelegateTest.FTT<T>(T, T)").WithLocation(71, 25),
667
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "PTT").WithArguments("DelegateTest.PTT<T>(T, params T[])").WithLocation(72, 25),
673
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "PTT").WithArguments("DelegateTest.PTT<T>(T, params T[])").WithLocation(75, 27),
679
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "PT").WithArguments("DelegateTest.PT<T>(params T[])").WithLocation(78, 23),
682
Diagnostic(ErrorCode.
ERR_CantInferMethTypeArgs
, "RunG").WithArguments("DelegateTest.RunG<T>(T)").WithLocation(80, 9));