460 references to ERR_NoImplicitConvCast
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Statements.cs (1)
2227
Error(diagnostics, ErrorCode.
ERR_NoImplicitConvCast
, syntax, distinguisher.First, distinguisher.Second);
Errors\ErrorFacts.cs (1)
770
case ErrorCode.
ERR_NoImplicitConvCast
:
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (9)
CodeGen\CodeGenNullCoalescingAssignmentTests.cs (1)
2583
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "a ??= default(int?)").WithArguments("int?", "int").WithLocation(9, 14));
CodeGen\CodeGenTupleEqualityTests.cs (1)
4866
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "a == a").WithArguments("bool?", "bool").WithLocation(7, 13),
CodeGen\CodeGenTupleTest.cs (5)
5607
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "d").WithArguments("(dynamic, dynamic)", "(int, int)").WithLocation(7, 24)
6960
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, @"((long, string))(1, ""hello"")").WithArguments("(long, string)", "(short, string)").WithLocation(10, 30),
6963
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, @"((long c, string d))(1, ""hello"")").WithArguments("(long c, string d)", "(short a, string b)").WithLocation(13, 34),
8016
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "((long c, long d))(e: 1, f:2)").WithArguments("(long c, long d)", "(int a, int b)").WithLocation(7, 29),
8025
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "((int c, int d))(e: 1, f:2)").WithArguments("(int c, int d)", "(short a, short b)").WithLocation(9, 33),
Emit\CompilationEmitTests.cs (2)
1526
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("I<Base>", "I<Derived>").WithLocation(7, 16)
1587
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("I<Derived>", "I<Base>").WithLocation(7, 16)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (80)
Attributes\AttributeTests_WellKnownAttributes.cs (1)
13754
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining").WithArguments("System.Runtime.CompilerServices.MethodImplOptions", "System.Runtime.CompilerServices.MethodCodeType").WithLocation(6, 70)
Emit\NumericIntPtrTests.cs (69)
2019
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "uint.MaxValue").WithArguments("uint", "nint").WithLocation(15, 17),
2022
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "long.MaxValue").WithArguments("long", "nint").WithLocation(16, 17),
2025
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "ulong.MaxValue").WithArguments("ulong", "nint").WithLocation(17, 17),
2028
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "float.MaxValue").WithArguments("float", "nint").WithLocation(18, 17),
2031
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "double.MaxValue").WithArguments("double", "nint").WithLocation(19, 17),
2034
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(decimal)int.MaxValue").WithArguments("decimal", "nint").WithLocation(20, 17),
2037
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(nuint)uint.MaxValue").WithArguments("nuint", "nint").WithLocation(22, 17),
2040
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "sbyte.MaxValue").WithArguments("sbyte", "nuint").WithLocation(30, 17),
2043
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "short.MaxValue").WithArguments("short", "nuint").WithLocation(33, 17),
2046
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "long.MaxValue").WithArguments("long", "nuint").WithLocation(37, 17),
2049
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "ulong.MaxValue").WithArguments("ulong", "nuint").WithLocation(38, 17),
2052
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "float.MaxValue").WithArguments("float", "nuint").WithLocation(39, 17),
2055
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "double.MaxValue").WithArguments("double", "nuint").WithLocation(40, 17),
2058
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(decimal)uint.MaxValue").WithArguments("decimal", "nuint").WithLocation(41, 17),
2061
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(nint)int.MaxValue").WithArguments("nint", "nuint").WithLocation(42, 17));
2121
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "n").WithArguments("nint", "sbyte").WithLocation(9, 24),
2124
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "n").WithArguments("nint", "byte").WithLocation(10, 22),
2127
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "n").WithArguments("nint", "char").WithLocation(11, 22),
2130
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "n").WithArguments("nint", "short").WithLocation(12, 23),
2133
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "n").WithArguments("nint", "ushort").WithLocation(13, 25),
2136
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "n").WithArguments("nint", "int").WithLocation(14, 21),
2139
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "n").WithArguments("nint", "uint").WithLocation(15, 22),
2142
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "n").WithArguments("nint", "ulong").WithLocation(17, 24),
2145
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "n").WithArguments("nint", "nuint").WithLocation(21, 24),
2148
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nu").WithArguments("nuint", "sbyte").WithLocation(29, 24),
2151
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nu").WithArguments("nuint", "byte").WithLocation(30, 22),
2154
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nu").WithArguments("nuint", "char").WithLocation(31, 22),
2157
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nu").WithArguments("nuint", "short").WithLocation(32, 23),
2160
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nu").WithArguments("nuint", "ushort").WithLocation(33, 25),
2163
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nu").WithArguments("nuint", "int").WithLocation(34, 21),
2166
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nu").WithArguments("nuint", "uint").WithLocation(35, 22),
2169
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nu").WithArguments("nuint", "long").WithLocation(36, 22),
2172
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nu").WithArguments("nuint", "nint").WithLocation(41, 22));
3510
expectedExplicitIL is null ? ErrorCode.ERR_NoImplicitConv : ErrorCode.
ERR_NoImplicitConvCast
:
6890
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "++x").WithArguments("long", "MyInt").WithLocation(5, 9),
6893
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x++").WithArguments("long", "MyInt").WithLocation(6, 9),
6896
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "--x").WithArguments("long", "MyInt").WithLocation(7, 9),
6899
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x--").WithArguments("long", "MyInt").WithLocation(8, 9)
6905
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "++x").WithArguments("long?", "MyInt").WithLocation(5, 9),
6908
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x++").WithArguments("long?", "MyInt").WithLocation(6, 9),
6911
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "--x").WithArguments("long?", "MyInt").WithLocation(7, 9),
6914
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x--").WithArguments("long?", "MyInt").WithLocation(8, 9)
6920
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "++x").WithArguments("ulong", "MyInt").WithLocation(5, 9),
6923
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x++").WithArguments("ulong", "MyInt").WithLocation(6, 9),
6926
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "--x").WithArguments("ulong", "MyInt").WithLocation(7, 9),
6929
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x--").WithArguments("ulong", "MyInt").WithLocation(8, 9),
6938
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "++x").WithArguments("ulong?", "MyInt").WithLocation(5, 9),
6941
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x++").WithArguments("ulong?", "MyInt").WithLocation(6, 9),
6944
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "--x").WithArguments("ulong?", "MyInt").WithLocation(7, 9),
6947
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x--").WithArguments("ulong?", "MyInt").WithLocation(8, 9),
9616
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "i1").WithArguments("nint", "E").WithLocation(10, 13),
9619
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "u1").WithArguments("nuint", "E").WithLocation(18, 13),
9622
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "default(E)").WithArguments("E", "nint").WithLocation(23, 13),
9625
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "E.A").WithArguments("E", "nint").WithLocation(24, 13),
9628
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "E.B").WithArguments("E", "nint").WithLocation(25, 13),
9631
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "default(E)").WithArguments("E", "nuint").WithLocation(30, 13),
9634
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "E.A").WithArguments("E", "nuint").WithLocation(31, 13),
9637
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "E.B").WithArguments("E", "nuint").WithLocation(32, 13));
9941
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("sbyte", "nuint"),
9944
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("short", "nuint"),
9947
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("int", "nuint"),
9950
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("long", "nuint"),
9953
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("nint", "nuint"),
9956
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("sbyte", "nuint"),
9959
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("short", "nuint"),
9962
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("int", "nuint"),
9965
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("long", "nuint"),
9968
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("nint", "nuint"));
10257
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments(AsNative(sourceType), "FinalType")
Semantics\PatternMatchingTests.cs (6)
4751
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "double.NaN").WithArguments("double", "int?").WithLocation(10, 18),
5319
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "12L").WithArguments("long", "byte").WithLocation(7, 32),
8713
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(object)null").WithArguments("object", "System.ReadOnlySpan<char>").WithLocation(4, 57));
8783
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(object)null").WithArguments("object", "System.ReadOnlySpan<char>").WithLocation(4, 63));
10313
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(object)null").WithArguments("object", "System.Span<char>").WithLocation(4, 49));
10383
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(object)null").WithArguments("object", "System.Span<char>").WithLocation(4, 55));
Semantics\PatternMatchingTests3.cs (1)
7562
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "100.0").WithArguments("double", type).WithLocation(5, 42));
Semantics\PatternMatchingTests4.cs (1)
3438
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "1").WithArguments("int", "int*").WithLocation(6, 18),
Semantics\PatternSwitchTests.cs (2)
1021
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "2").WithArguments("int", "Color").WithLocation(14, 18),
1038
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "2").WithArguments("int", "Color").WithLocation(14, 18),
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (28)
IOperation\IOperationTests_ArrayCreationAndInitializer.cs (3)
786
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "b").WithArguments("object", "int").WithLocation(6, 38)
883
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "M()").WithArguments("object", "int").WithLocation(6, 38)
950
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "0.0").WithArguments("double", "int").WithLocation(6, 38)
IOperation\IOperationTests_IArrayElementReferenceExpression.cs (1)
499
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "c").WithArguments("C", "int").WithLocation(6, 32)
IOperation\IOperationTests_IConversionExpression.cs (17)
134
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "f1").WithArguments("float", "int").WithLocation(7, 28)
252
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "i1").WithArguments("int", "Enum1").WithLocation(7, 30)
287
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "1").WithArguments("int", "Enum1").WithLocation(5, 30),
736
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "i1").WithArguments("int?", "int").WithLocation(7, 28)
1032
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "new C1()").WithArguments("C1", "I1").WithLocation(12, 27)
1153
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "i2").WithArguments("I2", "I1").WithLocation(17, 27)
1417
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "new object()").WithArguments("object", "System.Array").WithLocation(8, 30)
1488
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "new object()").WithArguments("object", "System.Collections.Generic.IList<int>").WithLocation(8, 35)
1736
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "c2").WithArguments("C2<C4>", "I1<C3>").WithLocation(11, 31)
1830
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "c2").WithArguments("C2<C3>", "I1<C4>").WithLocation(11, 31)
2013
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "new T()").WithArguments("T", "I1").WithLocation(11, 27)
2677
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "i1").WithArguments("int", "sbyte").WithLocation(7, 36)
2997
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "v1").WithArguments("void*", "int*").WithLocation(9, 29)
3032
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "0").WithArguments("int", "void*").WithLocation(8, 30),
3213
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "f").WithArguments("float", "int").WithLocation(7, 26)
3503
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(float)1.0").WithArguments("float", "int").WithLocation(6, 27),
4577
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(E1?)e").WithArguments("E1?", "int?").WithLocation(9, 29)
IOperation\IOperationTests_IFixedStatement.cs (1)
378
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "&p1").WithArguments("int**", "int").WithLocation(15, 22)
IOperation\IOperationTests_IIsPatternExpression.cs (1)
244
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "12.0").WithArguments("double", "int?").WithLocation(8, 28)
IOperation\IOperationTests_IPatternSwitchCase.cs (1)
389
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("object", "bool").WithLocation(9, 37)
IOperation\IOperationTests_ISwitchOperation.cs (2)
1225
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "1L").WithArguments("long", "int").WithLocation(8, 18)
1889
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "other").WithArguments("int?", "int").WithLocation(8, 18),
IOperation\IOperationTests_StackAllocArrayCreationAndInitializer.cs (2)
538
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "b").WithArguments("object", "int").WithLocation(6, 42),
701
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "0.0").WithArguments("double", "int").WithLocation(6, 42),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (262)
Semantics\ArglistTests.cs (1)
837
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "__refvalue(tr, double)").WithArguments("double", "int"),
Semantics\ConstantTests.cs (4)
3399
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(object)null").WithArguments("object", "string").WithLocation(9, 27),
3402
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, @"(object)""y""").WithArguments("object", "string").WithLocation(10, 27),
3411
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(object)null").WithArguments("object", "string").WithLocation(21, 18),
3414
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, @"(object)""b""").WithArguments("object", "string").WithLocation(23, 18),
Semantics\DeconstructionTests.cs (7)
770
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("int", "byte").WithLocation(8, 20),
4104
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "int y1").WithArguments("dynamic", "int").WithLocation(6, 19),
4113
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "int y2").WithArguments("dynamic", "int").WithLocation(7, 19),
4116
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "int*[] x3").WithArguments("dynamic", "int*[]").WithLocation(8, 10),
4119
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "int y3").WithArguments("dynamic", "int").WithLocation(8, 21),
4128
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "var*[] x4").WithArguments("dynamic", "var*[]").WithLocation(9, 10),
4131
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "int y4").WithArguments("dynamic", "int").WithLocation(9, 21)
Semantics\DelegateTypeTests.cs (1)
5794
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "1.0").WithArguments("double", "int").WithLocation(12, 24),
Semantics\ForEachTests.cs (1)
2964
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "d").WithArguments("Dummy", "System.Collections.IEnumerable").WithLocation(27, 25));
Semantics\ForLoopErrorTests.cs (1)
80
VerifyDiagnostics(Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "b").WithArguments("bool?", "bool"));
Semantics\FunctionPointerTests.cs (28)
525
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "i").WithArguments("int", "delegate*<void>").WithLocation(12, 31),
528
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "ptr").WithArguments("delegate*<void>", "int").WithLocation(13, 13),
754
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "new S()").WithArguments("S", "delegate*<int*, void>").WithLocation(8, 45)
1015
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param1").WithArguments("delegate*<string, string, void>", "delegate*<string, void>").WithLocation(6, 40),
1018
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param1").WithArguments("delegate*<string, string, void>", "delegate*<string, string, string, void>").WithLocation(7, 56)
1077
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param1").WithArguments("delegate*<ref object, void>", "delegate*<in object, void>").WithLocation(6, 43),
1080
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param1").WithArguments("delegate*<ref object, void>", "delegate*<object, void>").WithLocation(7, 40),
1083
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param1").WithArguments("delegate*<ref object, void>", "delegate*<ref string, void>").WithLocation(8, 44),
1086
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param1").WithArguments("delegate*<ref object, void>", "delegate*<out object, void>").WithLocation(9, 44),
1089
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param2").WithArguments("delegate*<out object, void>", "delegate*<in object, void>").WithLocation(10, 43),
1092
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param2").WithArguments("delegate*<out object, void>", "delegate*<object, void>").WithLocation(11, 40),
1095
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param2").WithArguments("delegate*<out object, void>", "delegate*<ref object, void>").WithLocation(12, 44),
1098
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param2").WithArguments("delegate*<out object, void>", "delegate*<out string, void>").WithLocation(13, 44)
1237
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param1").WithArguments("delegate*<ref string>", "delegate*<ref readonly string>").WithLocation(6, 47),
1240
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param1").WithArguments("delegate*<ref string>", "delegate*<string>").WithLocation(7, 34),
1243
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param1").WithArguments("delegate*<ref string>", "delegate*<object>").WithLocation(8, 34)
1317
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param1").WithArguments("delegate*<void>", "delegate* unmanaged[Cdecl]<void>").WithLocation(6, 49),
1320
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param1").WithArguments("delegate*<void>", "delegate* unmanaged[Thiscall]<void>").WithLocation(7, 52),
1323
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param1").WithArguments("delegate*<void>", "delegate* unmanaged[Stdcall]<void>").WithLocation(8, 51),
1326
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param2").WithArguments("delegate* unmanaged[Thiscall, Stdcall]<void>", "delegate* unmanaged[Thiscall]<void>").WithLocation(9, 52),
1329
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param2").WithArguments("delegate* unmanaged[Thiscall, Stdcall]<void>", "delegate* unmanaged[Stdcall]<void>").WithLocation(10, 51),
1332
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param2").WithArguments("delegate* unmanaged[Thiscall, Stdcall]<void>", "delegate* unmanaged[Thiscall, Cdecl]<void>").WithLocation(11, 59),
1335
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param2").WithArguments("delegate* unmanaged[Thiscall, Stdcall]<void>", "delegate* unmanaged[Cdecl, Stdcall]<void>").WithLocation(12, 58),
1338
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param2").WithArguments("delegate* unmanaged[Thiscall, Stdcall]<void>", "delegate* unmanaged[Thiscall, Stdcall, Cdecl]<void>").WithLocation(13, 68)
1476
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param1").WithArguments("delegate*<int, object>", "delegate*<object, string>").WithLocation(6, 42),
1479
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param1").WithArguments("delegate*<int, object>", "delegate*<int, string>").WithLocation(7, 39)
1533
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param1").WithArguments("delegate*<delegate*<object, void>, void>", "delegate*<delegate*<string, void>, void>").WithLocation(6, 57),
1536
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "param2").WithArguments("delegate*<delegate*<object>>", "delegate*<delegate*<string>>").WithLocation(7, 45)
Semantics\InterpolationTests.cs (1)
651
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "1E10").WithArguments("double", "int").WithLocation(5, 22),
Semantics\IteratorTests.cs (1)
82
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "1.1").WithArguments("double", "int").WithLocation(7, 22)
Semantics\LambdaTests.cs (5)
217
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "123.456").WithArguments("double", "int").WithLocation(58, 29),
223
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "1m").WithArguments("decimal", "double").WithLocation(62, 51),
5509
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "t").WithArguments("T", "U").WithLocation(8, 30),
5540
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "t").WithArguments("T", "U").WithLocation(9, 21),
5565
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "t").WithArguments("T", "U").WithLocation(7, 54),
Semantics\LocalFunctionTests.cs (4)
7003
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("object", "C1.var").WithLocation(7, 37),
7006
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("object", "C1.var").WithLocation(8, 44),
7009
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("object", "string").WithLocation(18, 41),
7012
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("object", "string").WithLocation(19, 48));
Semantics\NameCollisionTests.cs (4)
1782
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "M(x1 => { })").WithArguments("long", "int").WithLocation(10, 22),
1791
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "M(x2 => { })").WithArguments("long", "int").WithLocation(16, 22),
1800
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "M(x1 => { })").WithArguments("long", "int").WithLocation(10, 22),
1806
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "M(x2 => { })").WithArguments("long", "int").WithLocation(16, 22),
Semantics\NativeIntegerTests.cs (81)
5094
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "F1").WithArguments("System.IntPtr", "long").WithLocation(9, 18),
5097
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "F2").WithArguments("System.UIntPtr", "ulong").WithLocation(10, 19),
5100
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "F3").WithArguments("System.IntPtr?", "long?").WithLocation(11, 19),
5103
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "F4").WithArguments("System.UIntPtr?", "ulong?").WithLocation(12, 20),
5106
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("int", "System.IntPtr").WithLocation(16, 14),
5109
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "y").WithArguments("uint", "System.UIntPtr").WithLocation(17, 14),
5112
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "z").WithArguments("int?", "System.IntPtr?").WithLocation(18, 14),
5115
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "w").WithArguments("uint?", "System.UIntPtr?").WithLocation(19, 14)
5784
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "sbyte.MaxValue").WithArguments("sbyte", "nuint").WithLocation(5, 14),
5787
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "short.MaxValue").WithArguments("short", "nuint").WithLocation(8, 14),
5790
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "sbyte.MaxValue").WithArguments("sbyte", "nuint?").WithLocation(11, 14),
5793
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "short.MaxValue").WithArguments("short", "nuint?").WithLocation(14, 14)
6164
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "uint.MaxValue").WithArguments("uint", "nint").WithLocation(15, 17),
6167
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "long.MaxValue").WithArguments("long", "nint").WithLocation(16, 17),
6170
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "ulong.MaxValue").WithArguments("ulong", "nint").WithLocation(17, 17),
6173
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "float.MaxValue").WithArguments("float", "nint").WithLocation(18, 17),
6176
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "double.MaxValue").WithArguments("double", "nint").WithLocation(19, 17),
6179
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(decimal)int.MaxValue").WithArguments("decimal", "nint").WithLocation(20, 17),
6182
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(nuint)uint.MaxValue").WithArguments("nuint", "nint").WithLocation(22, 17),
6185
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "sbyte.MaxValue").WithArguments("sbyte", "nuint").WithLocation(30, 17),
6188
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "short.MaxValue").WithArguments("short", "nuint").WithLocation(33, 17),
6191
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "long.MaxValue").WithArguments("long", "nuint").WithLocation(37, 17),
6194
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "ulong.MaxValue").WithArguments("ulong", "nuint").WithLocation(38, 17),
6197
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "float.MaxValue").WithArguments("float", "nuint").WithLocation(39, 17),
6200
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "double.MaxValue").WithArguments("double", "nuint").WithLocation(40, 17),
6203
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(decimal)uint.MaxValue").WithArguments("decimal", "nuint").WithLocation(41, 17),
6206
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(nint)int.MaxValue").WithArguments("nint", "nuint").WithLocation(42, 17));
6264
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "n").WithArguments("nint", "sbyte").WithLocation(9, 24),
6267
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "n").WithArguments("nint", "byte").WithLocation(10, 22),
6270
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "n").WithArguments("nint", "char").WithLocation(11, 22),
6273
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "n").WithArguments("nint", "short").WithLocation(12, 23),
6276
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "n").WithArguments("nint", "ushort").WithLocation(13, 25),
6279
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "n").WithArguments("nint", "int").WithLocation(14, 21),
6282
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "n").WithArguments("nint", "uint").WithLocation(15, 22),
6285
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "n").WithArguments("nint", "ulong").WithLocation(17, 24),
6288
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "n").WithArguments("nint", "nuint").WithLocation(21, 24),
6291
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nu").WithArguments("nuint", "sbyte").WithLocation(29, 24),
6294
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nu").WithArguments("nuint", "byte").WithLocation(30, 22),
6297
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nu").WithArguments("nuint", "char").WithLocation(31, 22),
6300
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nu").WithArguments("nuint", "short").WithLocation(32, 23),
6303
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nu").WithArguments("nuint", "ushort").WithLocation(33, 25),
6306
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nu").WithArguments("nuint", "int").WithLocation(34, 21),
6309
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nu").WithArguments("nuint", "uint").WithLocation(35, 22),
6312
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nu").WithArguments("nuint", "long").WithLocation(36, 22),
6315
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nu").WithArguments("nuint", "nint").WithLocation(41, 22));
7821
expectedExplicitIL is null ? ErrorCode.ERR_NoImplicitConv : ErrorCode.
ERR_NoImplicitConvCast
:
10377
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "++x").WithArguments("long", "MyInt").WithLocation(5, 9),
10380
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x++").WithArguments("long", "MyInt").WithLocation(6, 9),
10383
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "--x").WithArguments("long", "MyInt").WithLocation(7, 9),
10386
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x--").WithArguments("long", "MyInt").WithLocation(8, 9)
10392
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "++x").WithArguments("long?", "MyInt").WithLocation(5, 9),
10395
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x++").WithArguments("long?", "MyInt").WithLocation(6, 9),
10398
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "--x").WithArguments("long?", "MyInt").WithLocation(7, 9),
10401
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x--").WithArguments("long?", "MyInt").WithLocation(8, 9)
10407
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "++x").WithArguments("ulong", "MyInt").WithLocation(5, 9),
10410
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x++").WithArguments("ulong", "MyInt").WithLocation(6, 9),
10413
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "--x").WithArguments("ulong", "MyInt").WithLocation(7, 9),
10416
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x--").WithArguments("ulong", "MyInt").WithLocation(8, 9),
10425
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "++x").WithArguments("ulong?", "MyInt").WithLocation(5, 9),
10428
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x++").WithArguments("ulong?", "MyInt").WithLocation(6, 9),
10431
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "--x").WithArguments("ulong?", "MyInt").WithLocation(7, 9),
10434
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x--").WithArguments("ulong?", "MyInt").WithLocation(8, 9),
13988
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "i1").WithArguments("nint", "E").WithLocation(10, 13),
13991
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "u1").WithArguments("nuint", "E").WithLocation(18, 13),
13994
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "default(E)").WithArguments("E", "nint").WithLocation(23, 13),
13997
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "E.A").WithArguments("E", "nint").WithLocation(24, 13),
14000
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "E.B").WithArguments("E", "nint").WithLocation(25, 13),
14003
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "default(E)").WithArguments("E", "nuint").WithLocation(30, 13),
14006
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "E.A").WithArguments("E", "nuint").WithLocation(31, 13),
14009
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "E.B").WithArguments("E", "nuint").WithLocation(32, 13));
14742
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("sbyte", "nuint").WithLocation(3, 40),
14745
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("short", "nuint").WithLocation(4, 40),
14748
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("int", "nuint").WithLocation(5, 38),
14751
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("long", "nuint").WithLocation(6, 39),
14754
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("nint", "nuint").WithLocation(7, 39),
14757
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("sbyte", "nuint").WithLocation(8, 47),
14760
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("short", "nuint").WithLocation(9, 47),
14763
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("int", "nuint").WithLocation(10, 45),
14766
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("long", "nuint").WithLocation(11, 46),
14769
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("nint", "nuint").WithLocation(12, 46));
15055
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments(sourceType, "FinalType")
Semantics\NullableReferenceTypesTests.cs (30)
4390
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x1").WithArguments("Base", "Outer").WithLocation(6, 19),
4665
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "y2").WithArguments("object", "T").WithLocation(11, 14),
4671
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "y4").WithArguments("object", "string").WithLocation(21, 14),
78700
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "default(T)").WithArguments("T", "System.Collections.Generic.IEnumerator<T>").WithLocation(4, 37),
79806
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "new S<object>()").WithArguments("S<object>", "bool").WithLocation(6, 18));
83359
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x1").WithArguments("long", "int?").WithLocation(5, 19),
83362
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x2").WithArguments("long?", "int?").WithLocation(10, 19),
83368
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x3").WithArguments("long?", "int?").WithLocation(16, 19)
91942
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "o").WithArguments("object", "IB").WithLocation(16, 13),
92469
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "t").WithArguments("(B, (A, A))", "(A, (B, B))").WithLocation(22, 13),
113372
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("object", "T").WithLocation(7, 13),
113375
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "y").WithArguments("object", "T").WithLocation(8, 13),
113432
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("object", "T").WithLocation(7, 13),
113435
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "y").WithArguments("object", "T").WithLocation(8, 13),
113493
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("object", "T").WithLocation(7, 13),
113496
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "y").WithArguments("object", "T").WithLocation(8, 13),
113549
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("T", "U").WithLocation(7, 13),
113576
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("T", "U").WithLocation(7, 13),
113603
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("T", "U").WithLocation(7, 13),
113630
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("T", "U").WithLocation(7, 13)
113654
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("object", "T").WithLocation(8, 13)
113932
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("Outer", "T").WithLocation(7, 13),
113935
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "y").WithArguments("Outer", "T").WithLocation(8, 13),
113962
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("Outer", "T").WithLocation(8, 13)
113990
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("Outer", "T").WithLocation(7, 13),
113996
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "y").WithArguments("Outer", "T").WithLocation(8, 13),
114026
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("Outer", "T").WithLocation(8, 13)
123470
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("T?", "T").WithLocation(5, 15),
156378
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("bool?", "bool").WithLocation(7, 13),
156384
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("bool?", "bool").WithLocation(12, 13),
Semantics\NullableTests.cs (1)
145
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "c++").WithArguments("int?", "C")
Semantics\OperatorTests.cs (4)
2425
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "a += b").WithArguments("int?", "int").WithLocation(6, 19)
3105
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "i32 += i64").WithArguments("long", "int").WithLocation(34, 9),
3108
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "d += c").WithArguments("C", "C.D").WithLocation(39, 9));
6214
CreateCompilation(text).VerifyDiagnostics(Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "b++").WithArguments("A", "B"));
Semantics\RawInterpolationTests.cs (1)
666
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "1E10").WithArguments("double", "int").WithLocation(5, 24),
Semantics\RecordTests.cs (2)
8374
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "s").WithArguments("S", "long").WithLocation(19, 41)
8542
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "c with { }").WithArguments("B", "C").WithLocation(13, 13),
Semantics\RefLocalsAndReturnsTests.cs (5)
2673
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "a[ref i]").WithArguments("object", "int").WithLocation(7, 13),
2679
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "a[out i]").WithArguments("object", "int").WithLocation(8, 13),
2688
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "a2[i, out i]").WithArguments("object", "int").WithLocation(10, 13),
2694
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "a2[i, ref i]").WithArguments("object", "int").WithLocation(11, 13),
2700
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "a2[ref i, out i]").WithArguments("object", "int").WithLocation(12, 13),
Semantics\ScriptSemanticsTests.cs (1)
937
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "42l").WithArguments("long", "int"));
Semantics\SemanticAnalyzerTests.cs (21)
720
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "l1").WithArguments("long", "int").WithLocation(34, 18),
1140
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(char)(One - 1)").WithArguments("char", "E").WithLocation(12, 13),
1143
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(F)(One - 1)").WithArguments("F", "E").WithLocation(25, 13),
1146
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "Null").WithArguments("object", "E").WithLocation(26, 13),
1152
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "F.Zero").WithArguments("F", "E").WithLocation(30, 13),
1158
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(char)One").WithArguments("char", "E").WithLocation(33, 13),
1161
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(sbyte)One").WithArguments("sbyte", "E").WithLocation(34, 13),
1164
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(byte)One").WithArguments("byte", "E").WithLocation(35, 13),
1167
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(short)One").WithArguments("short", "E").WithLocation(36, 13),
1170
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(ushort)One").WithArguments("ushort", "E").WithLocation(37, 13),
1173
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(int)One").WithArguments("int", "E").WithLocation(38, 13),
1176
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(uint)One").WithArguments("uint", "E").WithLocation(39, 13),
1179
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(long)One").WithArguments("long", "E").WithLocation(40, 13),
1182
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(ulong)One").WithArguments("ulong", "E").WithLocation(41, 13),
1185
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(decimal)One").WithArguments("decimal", "E").WithLocation(42, 13),
1188
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(float)One").WithArguments("float", "E").WithLocation(43, 13),
1191
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(double)One").WithArguments("double", "E").WithLocation(44, 13),
1194
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(F)One").WithArguments("F", "E").WithLocation(46, 13),
1197
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "new object()").WithArguments("object", "E").WithLocation(47, 13),
1200
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "1").WithArguments("int", "E").WithLocation(48, 13),
1203
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "F.One").WithArguments("F", "E").WithLocation(50, 13));
Semantics\SemanticErrorTests.cs (22)
164
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "Delegate.Combine(arrfoo)").WithArguments("System.Delegate", "boo"),
167
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "Delegate.Combine(goo, goo1)").WithArguments("System.Delegate", "boo")
3874
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "C.F()").WithArguments("E", "int").WithLocation(4, 9),
4738
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "new Explicit()").WithArguments("Explicit", "System.Exception").WithLocation(9, 26)
9146
new ErrorDescription[] { new ErrorDescription { Code = (int)ErrorCode.
ERR_NoImplicitConvCast
, Line = 8, Column = 27 } });
9161
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "0L").WithArguments("long", "int").WithLocation(3, 19));
9179
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "1L").WithArguments("long", "short").WithLocation(5, 25),
9204
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "2").WithArguments("int", "E").WithLocation(4, 11),
9207
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "'c'").WithArguments("char", "E").WithLocation(9, 13),
9229
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "'a'").WithArguments("char", "byte").WithLocation(3, 9));
9245
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "1L").WithArguments("long", "int").WithLocation(4, 9));
9284
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "G.A").WithArguments("long", "int").WithLocation(5, 9),
9287
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "G.B").WithArguments("long", "int").WithLocation(6, 9));
9310
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "1L").WithArguments("long", "int").WithLocation(11, 26));
9326
VerifyDiagnostics(Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "b").WithArguments("bool?", "bool"));
9350
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "Number.One").WithArguments("Number", "int").WithLocation(6, 28));
9377
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("double", "int").WithLocation(7, 30),
9380
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "y").WithArguments("float", "int").WithLocation(10, 30),
9383
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "z").WithArguments("decimal", "int").WithLocation(13, 30));
9402
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "o").WithArguments("object", "int").WithLocation(6, 15));
9423
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "o").WithArguments("object", "int").WithLocation(6, 13),
15898
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "1.0").WithArguments("double", "int").WithLocation(9, 49),
Semantics\SwitchTests.cs (8)
264
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "97.0f").WithArguments("float", "char").WithLocation(32, 18),
267
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "97.0f").WithArguments("float", "char").WithLocation(34, 18),
276
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "97").WithArguments("int", "char").WithLocation(38, 18),
290
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "97.0f").WithArguments("float", "char").WithLocation(32, 18),
293
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "97.0f").WithArguments("float", "char").WithLocation(34, 18),
302
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "97").WithArguments("int", "char").WithLocation(38, 18),
1086
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "1.2f").WithArguments("float", "int").WithLocation(10, 12)
1091
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "1.2f").WithArguments("float", "int").WithLocation(10, 12)
Semantics\TargetTypedConditionalOperatorTests.cs (4)
30
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "b ? 1 : 2").WithArguments("int", "short").WithLocation(6, 26));
47
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "b ? 0 : 0").WithArguments("int", "color").WithLocation(6, 19));
83
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "b ? 1000000 : 2").WithArguments("int", "short").WithLocation(6, 26)
107
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "b ? 1 : 0").WithArguments("int", "color").WithLocation(6, 19)
Semantics\UnsafeTests.cs (8)
5581
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "vv3").WithArguments("void*", "void**"));
5909
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "a").WithArguments("System.Array", "int*[]"),
5912
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "a").WithArguments("System.Array", "void*[]"),
7151
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "s").WithArguments("char*", "int*"));
7256
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "a").WithArguments("char*", "int*"));
7286
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "a").WithArguments("char*", "int*"));
8231
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "1L").WithArguments("long", "int"),
9723
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "&s.Buf").WithArguments("int**", "int*").WithLocation(14, 18),
Semantics\UserDefinedConversionTests.cs (1)
1677
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "i").WithArguments("int?", "C").WithLocation(3, 7)
Semantics\Utf8StringsLiteralsTests.cs (9)
145
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nullConstant").WithArguments("object", "byte[]").WithLocation(10, 30),
148
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nullConstant").WithArguments("object", "System.Span<byte>").WithLocation(11, 34),
151
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nullConstant").WithArguments("object", "System.Span<byte>").WithLocation(11, 34),
154
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nullConstant").WithArguments("object", "System.ReadOnlySpan<byte>").WithLocation(12, 42),
157
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nullConstant").WithArguments("object", "System.ReadOnlySpan<byte>").WithLocation(12, 42)
2335
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, @"""cat""u8").WithArguments("System.ReadOnlySpan<byte>", "C3").WithLocation(9, 16)
2486
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nullValue").WithArguments("object", "byte[]").WithLocation(9, 24),
2489
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nullValue").WithArguments("object", "System.Span<byte>").WithLocation(10, 27),
2492
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "nullValue").WithArguments("object", "System.ReadOnlySpan<byte>").WithLocation(11, 43)
Semantics\VarianceTests.cs (6)
117
Assert.Equal(ErrorCode.
ERR_NoImplicitConvCast
, (ErrorCode)errors.Single().Code);
233
Assert.True(code == ErrorCode.
ERR_NoImplicitConvCast
|| code == ErrorCode.ERR_NoImplicitConv, "Unexpected error code " + code);
300
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "bar").WithArguments("IC<double>", "IN<IC<string>>"));
336
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "new X ()").WithArguments("X", "A<Y>")
373
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "a").WithArguments("A", "N<X>"));
415
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "a").WithArguments("A", "N<X>"));
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (79)
BadSymbolReference.cs (9)
983
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "y4").WithArguments("T", "ErrorTest.I1<ErrorTest.I2>"),
989
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "y5").WithArguments("ErrorTest.I5", "ErrorTest.I1<ErrorTest.I2>"),
995
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "y3").WithArguments("T", "ErrorTest.I1<ErrorTest.I2>"),
1001
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "y").WithArguments("ErrorTest.C4", "ErrorTest.I1<ErrorTest.I2>")
1199
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "c13").WithArguments("ErrorTest.C13", "ErrorTest.I1"),
1205
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "y").WithArguments("ErrorTest.C4", "ErrorTest.I1"),
1211
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "y3").WithArguments("T", "ErrorTest.I1"),
1229
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "y4").WithArguments("T", "ErrorTest.I1"),
1278
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "c13").WithArguments("ErrorTest.C13", "ErrorTest.I1"),
Symbols\CheckedUserDefinedOperatorsTests.cs (6)
5332
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("C0", "long").WithLocation(25, 26),
5335
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("C0", "long").WithLocation(30, 28),
5338
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("C0", "int").WithLocation(35, 26),
5341
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("C0", "int").WithLocation(40, 28)
5624
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("C0", "long").WithLocation(10, 26),
5633
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("C0", "int").WithLocation(25, 26),
Symbols\ConversionTests.cs (1)
779
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "b").WithArguments("B", "A"));
Symbols\GenericConstraintConversionTests.cs (58)
59
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "u").WithArguments("U", "IB").WithLocation(25, 14),
61
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "v").WithArguments("V", "IB").WithLocation(26, 14),
95
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "t").WithArguments("T", "IB").WithLocation(17, 14));
141
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "u").WithArguments("U", "IA").WithLocation(15, 13),
143
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "t").WithArguments("T", "IB").WithLocation(16, 13),
145
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("X", "IB").WithLocation(22, 13),
147
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("X", "IA").WithLocation(26, 13));
216
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "u").WithArguments("U", "T").WithLocation(11, 13),
218
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "v").WithArguments("V", "T").WithLocation(12, 13),
220
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "w").WithArguments("W", "T").WithLocation(13, 13),
224
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "w").WithArguments("W", "U").WithLocation(16, 13),
232
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "t").WithArguments("T", "X").WithLocation(30, 13),
234
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "u").WithArguments("U", "X").WithLocation(31, 13),
236
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "v").WithArguments("V", "X").WithLocation(32, 13),
238
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "w").WithArguments("W", "X").WithLocation(33, 13),
246
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "u").WithArguments("U", "X").WithLocation(42, 13),
250
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "w").WithArguments("W", "X").WithLocation(44, 13),
256
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "u").WithArguments("U", "X").WithLocation(53, 13),
258
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "v").WithArguments("V", "X").WithLocation(54, 13),
260
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "w").WithArguments("W", "X").WithLocation(55, 13));
335
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "t").WithArguments("T", "IB").WithLocation(15, 13));
416
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "y").WithArguments("Y", "IIn<T>").WithLocation(20, 14),
418
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("X", "IOut<U>").WithLocation(30, 14),
420
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "y").WithArguments("Y", "IIn<T>").WithLocation(38, 14),
422
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("X", "IOut<U>").WithLocation(48, 14),
424
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "y").WithArguments("Y", "IIn<T>").WithLocation(56, 14),
426
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("X", "IOut<U>").WithLocation(66, 14));
536
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "iu").WithArguments("I<U>", "I<T>").WithLocation(9, 14),
538
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "it").WithArguments("I<T>", "I<U>").WithLocation(10, 14),
540
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "iu").WithArguments("IIn<U>", "IIn<T>").WithLocation(14, 14),
542
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "it").WithArguments("IIn<T>", "IIn<U>").WithLocation(15, 14),
544
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "iu").WithArguments("IOut<U>", "IOut<T>").WithLocation(19, 14),
546
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "it").WithArguments("IOut<T>", "IOut<U>").WithLocation(20, 14),
548
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "iu").WithArguments("I<U>", "I<T>").WithLocation(29, 14),
550
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "it").WithArguments("I<T>", "I<U>").WithLocation(30, 14),
552
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "iu").WithArguments("IIn<U>", "IIn<T>").WithLocation(34, 14),
554
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "it").WithArguments("IIn<T>", "IIn<U>").WithLocation(35, 14),
556
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "iu").WithArguments("IOut<U>", "IOut<T>").WithLocation(39, 14),
558
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "it").WithArguments("IOut<T>", "IOut<U>").WithLocation(40, 14),
560
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "iu").WithArguments("I<U>", "I<T>").WithLocation(49, 14),
562
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "it").WithArguments("I<T>", "I<U>").WithLocation(50, 14),
564
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "iu").WithArguments("IIn<U>", "IIn<T>").WithLocation(54, 14),
566
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "it").WithArguments("IOut<T>", "IOut<U>").WithLocation(60, 14),
568
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "iu").WithArguments("I<U>", "I<T>").WithLocation(68, 14),
570
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "it").WithArguments("I<T>", "I<U>").WithLocation(69, 14),
572
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "iu").WithArguments("IIn<U>", "IIn<T>").WithLocation(73, 14),
574
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "it").WithArguments("IIn<T>", "IIn<U>").WithLocation(74, 14),
576
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "iu").WithArguments("IOut<U>", "IOut<T>").WithLocation(78, 14),
578
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "it").WithArguments("IOut<T>", "IOut<U>").WithLocation(79, 14),
580
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "iu").WithArguments("I<U>", "I<T>").WithLocation(88, 14),
582
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "it").WithArguments("I<T>", "I<U>").WithLocation(89, 14),
584
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "iu").WithArguments("IIn<U>", "IIn<T>").WithLocation(93, 14),
586
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "it").WithArguments("IIn<T>", "IIn<U>").WithLocation(94, 14),
588
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "iu").WithArguments("IOut<U>", "IOut<T>").WithLocation(98, 14),
590
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "it").WithArguments("IOut<T>", "IOut<U>").WithLocation(99, 14));
609
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "u").WithArguments("U", "X").WithLocation(8, 13));
630
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "t").WithArguments("T", "Y").WithLocation(10, 13));
657
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "t").WithArguments("T", "I").WithLocation(10, 13));
Symbols\Source\EnumTests.cs (2)
89
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "2.2").WithArguments("double", "byte").WithLocation(4, 10),
860
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "(E3)e").WithArguments("Test.E3", "int"));
Symbols\StaticAbstractMembersInInterfacesTests.cs (1)
31190
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "x").WithArguments("int", "T").WithLocation(14, 16)
Symbols\SymbolDistinguisherTests.cs (1)
357
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "Lib.M()").WithArguments("I [Metadata, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null]", "I [file.cs(2)]").WithLocation(8, 15));
Symbols\SymbolErrorTests.cs (1)
15557
Diagnostic(ErrorCode.
ERR_NoImplicitConvCast
, "1.2").WithArguments("double", "int"),