131 references to ERR_BadInstanceArgType
Microsoft.CodeAnalysis.CSharp (2)
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1313
ErrorCode.
ERR_BadInstanceArgType
,
Errors\ErrorFacts.cs (1)
1425
or ErrorCode.
ERR_BadInstanceArgType
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (17)
CodeGen\CodeGenAwaitForeachTests.cs (6)
6572
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "new C()").WithArguments("C", "GetAsyncEnumerator", "Extensions.GetAsyncEnumerator(int)", "int").WithLocation(10, 33),
6608
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "1").WithArguments("int", "GetAsyncEnumerator", "Extensions.GetAsyncEnumerator(int?)", "int?").WithLocation(8, 33),
6644
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "new object()").WithArguments("object", "GetAsyncEnumerator", "Extensions.GetAsyncEnumerator(int)", "int").WithLocation(8, 33),
6680
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "(int?)1").WithArguments("int?", "GetAsyncEnumerator", "Extensions.GetAsyncEnumerator(int)", "int").WithLocation(8, 33),
6717
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "0").WithArguments("int", "GetAsyncEnumerator", "Extensions.GetAsyncEnumerator(E)", "E").WithLocation(9, 33),
6886
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, @"$"" """).WithArguments("string", "GetAsyncEnumerator", "Extensions.GetAsyncEnumerator(System.FormattableString)", "System.FormattableString").WithLocation(8, 33),
CodeGen\CodeGenForEachTests.cs (5)
2809
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "new C()").WithArguments("C", "GetEnumerator", "Extensions.GetEnumerator(int)", "int").WithLocation(9, 27),
2844
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "1").WithArguments("int", "GetEnumerator", "Extensions.GetEnumerator(int?)", "int?").WithLocation(7, 27),
2879
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "new object()").WithArguments("object", "GetEnumerator", "Extensions.GetEnumerator(int)", "int").WithLocation(7, 27),
2914
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "(int?)1").WithArguments("int?", "GetEnumerator", "Extensions.GetEnumerator(int)", "int").WithLocation(7, 27),
2951
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "0").WithArguments("int", "GetEnumerator", "Extensions.GetEnumerator(E)", "E").WithLocation(9, 27),
CodeGen\CodeGenImplicitlyTypeArraysTests.cs (1)
153
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "a").WithArguments("?[]", "SequenceEqual", "System.Linq.Queryable.SequenceEqual<Test.Program.E>(System.Linq.IQueryable<Test.Program.E>, System.Collections.Generic.IEnumerable<Test.Program.E>)", "System.Linq.IQueryable<Test.Program.E>").WithLocation(17, 35));
CodeGen\CodeGenTupleTest.cs (3)
25232
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "(1, 2)").WithArguments("(int, int)", "M", "C.M((int x, long y))", "(int x, long y)").WithLocation(10, 34),
25235
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "(First: 1, Second: 2L)").WithArguments("(int, long)", "M1", "C.M1((int x, long? y))", "(int x, long? y)").WithLocation(16, 34),
25241
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "notAliteral").WithArguments("(int A, int B)", "M", "C.M((int x, long y))", "(int x, long y)").WithLocation(23, 34)
CodeGen\UnsafeTests.cs (2)
5798
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "new S1?()").WithArguments("S1?", "GetPinnableReference", "FixAllExt.GetPinnableReference(S2)", "S2").WithLocation(10, 25),
5804
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "new S2?()").WithArguments("S2?", "GetPinnableReference", "FixAllExt.GetPinnableReference(S2)", "S2").WithLocation(18, 25),
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (53)
FirstClassSpanTests.cs (29)
4945
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "a").WithArguments("int[]", "M", "C.M(System.Span<int>, int)", "System.Span<int>").WithLocation(5, 10));
5015
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "a").WithArguments("int[]", "M", "C.M(System.Span<int>, int)", "System.Span<int>").WithLocation(6, 21));
5072
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "a").WithArguments("int[]", "M", "C.M<int>(System.Span<int>, int)", "System.Span<int>").WithLocation(7, 10));
5128
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "a").WithArguments("int[]", "M", "C.M<int>(System.Span<int>, int)", "System.Span<int>").WithLocation(9, 21),
6414
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "arg").WithArguments("int[]", "E", "C.E(System.Span<int>)", "System.Span<int>").WithLocation(7, 40));
6455
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "arg").WithArguments("System.Span<int>", "E", "C.E(System.ReadOnlySpan<int>)", "System.ReadOnlySpan<int>").WithLocation(7, 44));
6496
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "arg").WithArguments("System.Span<string>", "E", "C.E(System.ReadOnlySpan<object>)", "System.ReadOnlySpan<object>").WithLocation(7, 47));
6538
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "arg").WithArguments("System.ReadOnlySpan<string>", "E", "C.E(System.ReadOnlySpan<object>)", "System.ReadOnlySpan<object>").WithLocation(7, 55));
6579
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "arg").WithArguments("string", "E", "C.E(System.ReadOnlySpan<char>)", "System.ReadOnlySpan<char>").WithLocation(7, 41));
6620
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "arg").WithArguments("int[]", "E", "C.E(ref System.Span<int>)", "ref System.Span<int>").WithLocation(7, 40));
6641
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "arg").WithArguments("int[]", "E", $"C.E({modifier} System.Span<int>)", $"{modifier} System.Span<int>").WithLocation(7, 40));
6991
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "arg").WithArguments("int[]", "E", "C.E(System.Span<int>)", "System.Span<int>").WithLocation(4, 40));
7065
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "arg").WithArguments("System.Span<int>", "E1", "C.E1(int[])", "int[]").WithLocation(3, 45),
7068
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "arg").WithArguments("System.ReadOnlySpan<int>", "E1", "C.E1(int[])", "int[]").WithLocation(4, 53),
7071
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "arg").WithArguments("System.ReadOnlySpan<string>", "E2", "C.E2(object[])", "object[]").WithLocation(5, 56),
7074
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "arg").WithArguments("System.ReadOnlySpan<object>", "E3", "C.E3(string[])", "string[]").WithLocation(6, 56));
7164
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "a").WithArguments("T[]", "M1", "Extensions.M1<U>(System.Span<U>)", "System.Span<U>").WithLocation(11, 9),
7167
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "a").WithArguments("T[]", "M2", "Extensions.M2<U>(System.ReadOnlySpan<U>)", "System.ReadOnlySpan<U>").WithLocation(12, 9));
7194
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "a").WithArguments("T[]", "M1", "Extensions.M1<U>(System.Span<U>)", "System.Span<U>").WithLocation(13, 9));
7214
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "arg").WithArguments("string[]", "E", "C.E(System.ReadOnlySpan<object>)", "System.ReadOnlySpan<object>").WithLocation(7, 43));
8409
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "new int[0]").WithArguments("int[]", "E", "C.E(System.Span<int>)", "System.Span<int>").WithLocation(3, 2));
8457
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "new string[0]").WithArguments("string[]", "E", "C.E(System.Span<object>)", "System.Span<object>").WithLocation(3, 2),
8460
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "new object[0]").WithArguments("object[]", "E", "C.E(System.Span<object>)", "System.Span<object>").WithLocation(4, 2));
8489
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "default(Span<string>)").WithArguments("System.Span<string>", "E", "C.E(System.Span<object>)", "System.Span<object>").WithLocation(3, 1),
8492
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "default(ReadOnlySpan<string>)").WithArguments("System.ReadOnlySpan<string>", "E", "C.E(System.Span<object>)", "System.Span<object>").WithLocation(4, 1));
8606
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "new string[0]").WithArguments("string[]", "M", "C.M(System.ReadOnlySpan<string>)", "System.ReadOnlySpan<string>").WithLocation(3, 2),
8609
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "new object[0]").WithArguments("object[]", "M", "C.M(System.ReadOnlySpan<string>)", "System.ReadOnlySpan<string>").WithLocation(4, 2),
8612
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "default(Span<string>)").WithArguments("System.Span<string>", "M", "C.M(System.ReadOnlySpan<string>)", "System.ReadOnlySpan<string>").WithLocation(5, 2),
8615
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "default(Span<object>)").WithArguments("System.Span<object>", "M", "C.M(System.ReadOnlySpan<string>)", "System.ReadOnlySpan<string>").WithLocation(6, 2));
Semantics\CollectionExpressionTests.cs (2)
40907
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "[x, ..y]").WithArguments("MyCollection<int?>", "Add", "Extensions.Add(string, int)", "string").WithLocation(19, 32),
40913
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "new() { x }").WithArguments("MyCollection<int?>", "Add", "Extensions.Add(string, int)", "string").WithLocation(20, 32),
Semantics\ExtensionOperatorsTests.cs (6)
1922
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "System.Nullable<S1>").WithArguments("S1?", "M1", "Extensions1.extension(S1).M1(S1?)", "S1").WithLocation(25, 9)
2626
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "System.Nullable<S1>").WithArguments("S1?", "M1", "Extensions1.extension(S1).M1(S1?)", "S1").WithLocation(28, 9)
7959
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "System.Nullable<S1>").WithArguments("S1?", "M1", "Extensions1.extension(S1).M1(S1?)", "S1").WithLocation(25, 9)
13349
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "System.Nullable<S1>").WithArguments("S1?", "M1", "Extensions1.extension(S1).M1(S1?)", "S1").WithLocation(25, 9)
14474
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "S1").WithArguments("S1", "M1", "Extensions1.extension(S1?).M1(S1?)", "S1?").WithLocation(35, 9)
14532
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "System.Nullable<S1>").WithArguments("S1?", "M1", "Extensions1.extension(S1).M1(S1?)", "S1").WithLocation(36, 9)
Semantics\ExtensionTests.cs (16)
12283
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "new object()").WithArguments("object", "M", "E.extension(string).M()", "string").WithLocation(1, 1),
12286
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "new object()").WithArguments("object", "M2", "E.M2(string)", "string").WithLocation(2, 1)
12441
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "new C<int>()").WithArguments("C<int>", "M", "E.extension<?>(C<?>).M<?, ?>()", "C<?>").WithLocation(1, 1));
14569
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "i").WithArguments("System.Collections.Generic.IEnumerable<object>", "M", "E.extension(System.Collections.Generic.IEnumerable<string>).M()", "System.Collections.Generic.IEnumerable<string>").WithLocation(4, 1),
14655
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "int").WithArguments("int", "M", "E.extension(int?).M()", "int?").WithLocation(1, 1),
14658
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "42").WithArguments("int", "M2", "E.M2(int?)", "int?").WithLocation(2, 1),
14901
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "new Derived()").WithArguments("Derived", "M", "E.extension(I<object>).M()", "I<object>").WithLocation(1, 1),
14904
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "new Derived()").WithArguments("Derived", "M2", "E.M2(I<object>)", "I<object>").WithLocation(2, 1));
23548
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "i").WithArguments("string[]", "M", "E.M(System.Span<object>)", "System.Span<object>").WithLocation(3, 1));
31978
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "object").WithArguments("object", "M", "E.extension<U>(U).M<T>(T)", "U").WithLocation(2, 1),
31981
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "new object()").WithArguments("object", "M", "E.extension<U>(U).M<T>(T)", "U").WithLocation(3, 1));
32032
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "object").WithArguments("object", "M", "E.extension<U>(U).M(object)", "U").WithLocation(2, 1),
32472
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "i").WithArguments("int", "M", "E.extension(params int[]).M()", "params int[]").WithLocation(2, 1));
32768
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "object").WithArguments("object", "M", "E.extension<string>(string).M<long>(long)", "string").WithLocation(1, 1));
32936
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "object").WithArguments("object", "M", "E.extension(string).M()", "string").WithLocation(1, 1),
42328
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "[oNull, oNotNull]").WithArguments("MyCollection<object>", "Add", "E.extension<T>(MyCollection<T>).Add(T)", "MyCollection<T>").WithLocation(7, 26));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (20)
Semantics\BindingAwaitTests.cs (3)
342
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "new A()").WithArguments("A", "GetAwaiter", "MyExtensions.GetAwaiter(C)", "C"),
345
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "new B()").WithArguments("B", "GetAwaiter", "MyExtensions.GetAwaiter(C)", "C")
1526
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "new D()").WithArguments("D", "GetAwaiter", "MyExtensions.GetAwaiter(C, object)", "C").WithLocation(13, 15));
Semantics\InterpolationTests.cs (1)
17798
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, @"$""Test""").WithArguments("string", "M", "StringExt.M(CustomHandler)", "CustomHandler").WithLocation(2, 1)
Semantics\NullableReferenceTypesTests.cs (1)
89041
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "i").WithArguments("I<object>", "F", "E.F<T>(I<T>, T)", "I<T>").WithLocation(12, 9));
Semantics\OverloadResolutionPerfTests.cs (1)
190
Select(i => Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "x").WithArguments($"C{i * 2}", "G", "S.G(C1, System.Action<C1>)", "C1")).
Semantics\OverloadResolutionTests.cs (1)
9372
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "a").WithArguments("A", "F", "E.F(B, System.Action<object>, A)", "B").WithLocation(9, 9));
Semantics\RawInterpolationTests_Handler.cs (1)
13212
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, @"$""""""Test""""""").WithArguments("string", "M", "StringExt.M(CustomHandler)", "CustomHandler").WithLocation(2, 1));
Semantics\RefExtensionMethodsTests.cs (10)
1634
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "intValue").WithArguments("int", "Print", "Extensions.Print(ref long)", "ref long").WithLocation(14, 9));
1663
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "intValue").WithArguments("int", "Print", "Extensions.Print(in long)", "in long").WithLocation(14, 9));
1696
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "intTuple").WithArguments("(int intValue1, int intValue2)", "Print", "Extensions.Print(ref (long, long))", "ref (long, long)").WithLocation(16, 9));
1729
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "intTuple").WithArguments("(int intValue1, int intValue2)", "Print", "Extensions.Print(in (long, long))", "in (long, long)").WithLocation(16, 9));
1760
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "0").WithArguments("int", "Print", "Extensions.Print(ref int?)", "ref int?").WithLocation(13, 9),
1763
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "intValue").WithArguments("int", "Print", "Extensions.Print(ref int?)", "ref int?").WithLocation(16, 9));
1794
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "0").WithArguments("int", "Print", "Extensions.Print(in int?)", "in int?").WithLocation(13, 9),
1797
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "intValue").WithArguments("int", "Print", "Extensions.Print(in int?)", "in int?").WithLocation(16, 9));
1828
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "stringValue").WithArguments("string", "Print", "Extensions.Print(ref Test)", "ref Test").WithLocation(16, 9));
1859
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "stringValue").WithArguments("string", "Print", "Extensions.Print(ref Test)", "ref Test").WithLocation(16, 9));
Semantics\SemanticErrorTests.cs (2)
17033
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "f").WithArguments("float", "F", "S.F(double)", "double").WithLocation(5, 9));
17055
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "a").WithArguments("A", "E", "S.E(B)", "B").WithLocation(6, 9)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (39)
Symbols\ConversionTests.cs (32)
2409
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "i").WithArguments("int", "F", "E.F(long)", "long").WithLocation(14, 9),
2412
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "t").WithArguments("(int, int)", "G", "E.G((long, long))", "(long, long)").WithLocation(16, 9));
2444
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "i").WithArguments("int", "F", "E.F(int?)", "int?").WithLocation(13, 9),
2447
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "t").WithArguments("(int, int)", "G", "E.G((int, int)?)", "(int, int)?").WithLocation(17, 9));
2485
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "0").WithArguments("int", "F", "C.F(E)", "E").WithLocation(15, 9),
2488
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "e").WithArguments("E", "G", "C.G(E?)", "E?").WithLocation(17, 9),
2491
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "0").WithArguments("int", "G", "C.G(E?)", "E?").WithLocation(21, 9),
2494
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "(e, e)").WithArguments("(E, E)", "H", "C.H((E, E?))", "(E, E?)").WithLocation(23, 9));
2539
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "1").WithArguments("int", "S08", "C.S08(sbyte)", "sbyte").WithLocation(21, 9),
2542
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "2").WithArguments("int", "S16", "C.S16(short)", "short").WithLocation(22, 9),
2545
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "4").WithArguments("int", "S64", "C.S64(long)", "long").WithLocation(24, 9),
2548
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "5").WithArguments("int", "U08", "C.U08(byte)", "byte").WithLocation(25, 9),
2551
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "6").WithArguments("int", "U16", "C.U16(ushort)", "ushort").WithLocation(26, 9),
2554
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "7").WithArguments("int", "U32", "C.U32(uint)", "uint").WithLocation(27, 9),
2557
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "8").WithArguments("int", "U64", "C.U64(ulong)", "ulong").WithLocation(28, 9),
2560
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "10L").WithArguments("long", "U64", "C.U64(ulong)", "ulong").WithLocation(32, 9));
2605
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "1").WithArguments("int", "S08", "C.S08(sbyte?)", "sbyte?").WithLocation(21, 9),
2608
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "2").WithArguments("int", "S16", "C.S16(short?)", "short?").WithLocation(22, 9),
2611
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "3").WithArguments("int", "S32", "C.S32(int?)", "int?").WithLocation(23, 9),
2614
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "4").WithArguments("int", "S64", "C.S64(long?)", "long?").WithLocation(24, 9),
2617
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "5").WithArguments("int", "U08", "C.U08(byte?)", "byte?").WithLocation(25, 9),
2620
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "6").WithArguments("int", "U16", "C.U16(ushort?)", "ushort?").WithLocation(26, 9),
2623
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "7").WithArguments("int", "U32", "C.U32(uint?)", "uint?").WithLocation(27, 9),
2626
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "8").WithArguments("int", "U64", "C.U64(ulong?)", "ulong?").WithLocation(28, 9),
2629
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "9L").WithArguments("long", "S64", "C.S64(long?)", "long?").WithLocation(31, 9),
2632
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "10L").WithArguments("long", "U64", "C.U64(ulong?)", "ulong?").WithLocation(32, 9));
2674
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "a").WithArguments("A", "F", "E.F(B)", "B"),
2677
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "s").WithArguments("S", "G", "E.G(S?)", "S?").WithLocation(26, 9),
2680
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "a").WithArguments("A", "G", "E.G(S?)", "S?"));
2724
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "(a, b)").WithArguments("(A, B)", "F", "E.F((B, B))", "(B, B)").WithLocation(26, 9),
2727
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "(b, a)").WithArguments("(B, A)", "G", "E.G((B, B)?)", "(B, B)?").WithLocation(28, 9),
2730
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "(s, s)").WithArguments("(S, S)", "H", "E.H((S, S?))", "(S, S?)").WithLocation(30, 9));
Symbols\ExtensionMethodTests.cs (6)
2011
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "a").WithArguments("A", "B", "Extensions.B(B)", "B"),
2014
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "b").WithArguments("B", "A", "Extensions.A(A)", "A"),
2017
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "s").WithArguments("S", "A", "Extensions.A(A)", "A"),
2020
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "1").WithArguments("int", "A", "Extensions.A(A)", "A")
2049
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "2").WithArguments("int", "E2", "S.E2(double)", "double").WithLocation(6, 9),
2052
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "3").WithArguments("int", "E3", "S.E3(long, params object[])", "long").WithLocation(7, 9));
Symbols\GenericConstraintTests.cs (1)
6050
Diagnostic(ErrorCode.
ERR_BadInstanceArgType
, "o").WithArguments("U", "E2", "M.E2(System.Collections.Generic.IEnumerable<object>)", "System.Collections.Generic.IEnumerable<object>")