41 references to ERR_BadArgTypesForCollectionAdd
Microsoft.CodeAnalysis.CSharp (2)
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1137
diagnostics.Add(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, location, symbols, method);
Errors\ErrorFacts.cs (1)
1445
or ErrorCode.
ERR_BadArgTypesForCollectionAdd
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (36)
Semantics\CollectionExpressionTests.cs (35)
7331
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "y").WithArguments("S<T, U>.Add(T)").WithLocation(11, 50),
8038
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "3").WithArguments("Extensions.Add<int>(ref MyCollection<int>, string)").WithLocation(20, 21),
8044
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "4").WithArguments("Extensions.Add<int>(ref MyCollection<int>, string)").WithLocation(21, 14),
11068
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "d1").WithArguments("MyCollection.Add(int)").WithLocation(10, 29),
11074
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "d2").WithArguments("MyCollection.Add(int)").WithLocation(10, 35),
11080
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "e1").WithArguments("MyCollection.Add(int)").WithLocation(10, 41),
11086
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "e2").WithArguments("MyCollection.Add(int)").WithLocation(10, 47),
11092
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "(dynamic)x").WithArguments("MyCollection.Add(int)").WithLocation(14, 16),
11098
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "(IEnumerable)y").WithArguments("MyCollection.Add(int)").WithLocation(14, 30));
27506
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "F1()").WithArguments("MyCollection<int>.Add(string)").WithLocation(5, 27),
27515
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "F2()").WithArguments("MyCollection<int>.Add(string)").WithLocation(5, 35));
27599
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "F1()").WithArguments("Extensions.Add<int>(MyCollection<int>, string)").WithLocation(5, 27),
27608
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "F2()").WithArguments("Extensions.Add<int>(MyCollection<int>, string)").WithLocation(5, 35));
27690
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "x").WithArguments("Extensions.Add<int>(MyCollection<int>, params string[])").WithLocation(5, 27),
27699
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "y").WithArguments("Extensions.Add<int>(MyCollection<int>, params string[])").WithLocation(5, 32));
29606
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "new object()").WithArguments("MyCollection2<object, int>.Add(int)").WithLocation(4, 33),
29665
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "uint.MaxValue").WithArguments("MyCollection.Add(sbyte)").WithLocation(4, 19),
39212
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "x").WithArguments("MyCollection<int?>.Add(string)").WithLocation(7, 33),
39221
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "y").WithArguments("MyCollection<int?>.Add(string)").WithLocation(7, 38));
39462
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "x").WithArguments("MyCollection<int?>.Add(R)").WithLocation(21, 33),
39471
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "y").WithArguments("MyCollection<int?>.Add(R)").WithLocation(21, 38),
39474
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "null").WithArguments("MyCollection<int?>.Add(R)").WithLocation(21, 41),
39931
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "x").WithArguments("MyCollection<int?>.Add(int?[])").WithLocation(7, 33),
39940
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "y").WithArguments("MyCollection<int?>.Add(int?[])").WithLocation(7, 38));
40123
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "x").WithArguments("MyCollection<int>.Add(string)").WithLocation(8, 32),
40132
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "y").WithArguments("MyCollection<int>.Add(string)").WithLocation(8, 37));
40240
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "x").WithArguments("MyCollection<object>.Add(string)").WithLocation(7, 35),
40249
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "y").WithArguments("MyCollection<object>.Add(string)").WithLocation(7, 40));
40718
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "x").WithArguments("Extensions.Add<int>(MyCollection<int>, string)").WithLocation(8, 32),
40727
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "y").WithArguments("Extensions.Add<int>(MyCollection<int>, string)").WithLocation(8, 37));
40926
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "x").WithArguments("Extensions.Add(string, int)").WithLocation(20, 40)
41814
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "x").WithArguments("MyCollection<object>.Add(void*)").WithLocation(7, 35),
41823
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "y").WithArguments("MyCollection<object>.Add(void*)").WithLocation(7, 40));
41862
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "x").WithArguments("Extensions1.Add<object>(MyCollection<object>, void*)").WithLocation(7, 35),
41871
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "y").WithArguments("Extensions1.Add<object>(MyCollection<object>, void*)").WithLocation(7, 40));
Semantics\ExtensionTests.cs (1)
16333
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "object.M").WithArguments("System.Collections.Generic.List<int>.Add(int)").WithLocation(1, 54),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\ObjectAndCollectionInitializerTests.cs (2)
2419
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, @"""hi""").WithArguments("TestClass.Add(int)").WithLocation(14, 49),
2751
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "1").WithArguments("C.Add(string)").WithLocation(10, 27),
Semantics\SemanticErrorTests.cs (1)
18849
Diagnostic(ErrorCode.
ERR_BadArgTypesForCollectionAdd
, "{ d, GetEnumerator }").WithArguments("C.Add(int, System.RuntimeArgumentHandle)").WithLocation(19, 13),