144 references to ERR_NotConstantExpression
Microsoft.CodeAnalysis.CSharp (2)
Errors\ErrorFacts.cs (1)
664
case ErrorCode.
ERR_NotConstantExpression
:
Symbols\ConstantValueUtils.cs (1)
140
diagnostics.Add(ErrorCode.
ERR_NotConstantExpression
, initValueNodeLocation, thisSymbol);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (5)
BreakingChanges.cs (3)
253
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"null ?? ""ABC""").WithArguments("b"),
254
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"""DEF"" ?? null").WithArguments("c"),
255
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "(int?)null ?? 123").WithArguments("d"));
CodeGen\CodeGenFieldInitTests.cs (2)
678
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "F2").WithArguments("B.F1").WithLocation(7, 27));
693
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "F2").WithArguments("B.F1").WithLocation(3, 27));
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (33)
Emit\NumericIntPtrTests.cs (18)
2194
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "checked((IntPtr)x)").WithArguments("y").WithLocation(7, 26),
2245
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "unchecked((IntPtr)x)").WithArguments("y").WithLocation(7, 26));
8888
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, expr).WithArguments("Library.F")
8893
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, $"checked({expr})").WithArguments("Library.F")
8895
constantDeclaration(opType, declarations, $"unchecked({expr})", null, new[] { Diagnostic(ErrorCode.
ERR_NotConstantExpression
, $"unchecked({expr})").WithArguments("Library.F") });
8907
constantDeclaration(opType, declarations, expr, null, new[] { Diagnostic(ErrorCode.
ERR_NotConstantExpression
, expr).WithArguments("Library.F") });
8908
constantDeclaration(opType, declarations, $"checked({expr})", null, new[] { Diagnostic(ErrorCode.
ERR_NotConstantExpression
, $"checked({expr})").WithArguments("Library.F") });
8909
constantDeclaration(opType, declarations, $"unchecked({expr})", null, new[] { Diagnostic(ErrorCode.
ERR_NotConstantExpression
, $"unchecked({expr})").WithArguments("Library.F") });
8942
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, expr).WithArguments("Library.F")
8947
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, $"checked({expr})").WithArguments("Library.F")
8949
constantDeclaration(opType, declarations, $"unchecked({expr})", null, new[] { Diagnostic(ErrorCode.
ERR_NotConstantExpression
, $"unchecked({expr})").WithArguments("Library.F") });
8961
constantDeclaration(opType, declarations, expr, null, new[] { Diagnostic(ErrorCode.
ERR_NotConstantExpression
, expr).WithArguments("Library.F") });
8962
constantDeclaration(opType, declarations, $"checked({expr})", null, new[] { Diagnostic(ErrorCode.
ERR_NotConstantExpression
, $"checked({expr})").WithArguments("Library.F") });
8963
constantDeclaration(opType, declarations, $"unchecked({expr})", null, new[] { Diagnostic(ErrorCode.
ERR_NotConstantExpression
, $"unchecked({expr})").WithArguments("Library.F") });
9060
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "unchecked(uint.MaxValue + (UIntPtr)42)").WithArguments("x").WithLocation(8, 27),
9063
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "checked(uint.MaxValue + (UIntPtr)42)").WithArguments("y").WithLocation(9, 27),
9127
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "unchecked(-(IntPtr)int.MinValue)").WithArguments("x").WithLocation(8, 26),
9130
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "checked(-(IntPtr)int.MinValue)").WithArguments("y").WithLocation(9, 26),
Semantics\PatternMatchingTests.cs (2)
3496
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "3 is var x2 ? 3 : 3").WithArguments("S.F2").WithLocation(5, 18),
3499
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "3 is var x1 ? x1 : 3").WithArguments("S.F1").WithLocation(4, 18)
Semantics\PatternMatchingTests_Global.cs (2)
6186
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "H.Dummy(1 is var x1)").WithArguments("b").WithLocation(3, 20),
6224
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "H.Dummy(1 is var x1)").WithArguments("<invalid-global-code>.b").WithLocation(3, 20),
Semantics\PatternMatchingTests_Scope.cs (8)
3430
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "6 is int x6 && x6 > 0 ? 1 : 0").WithArguments("X.Test61").WithLocation(12, 14),
3433
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "6 is int x6 && x6 > 0 ? 1 : 0").WithArguments("X.Test62").WithLocation(12, 54),
3436
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "7 is int x7 && x7 > 0 ? 1 : 0").WithArguments("X.Test71").WithLocation(14, 14),
3442
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "3 is int x3 ? x3 : 0").WithArguments("X.Test3").WithLocation(4, 13)
3508
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "3 is int x3 && x3 > 0").WithArguments("X.Test3").WithLocation(8, 24),
3517
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "6 is int x6 && x6 > 0").WithArguments("X.Test61").WithLocation(16, 25),
3520
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "6 is int x6 && x6 > 0").WithArguments("X.Test62").WithLocation(16, 57),
3523
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "7 is int x7 && x7 > 0").WithArguments("X.Test71").WithLocation(18, 25),
Semantics\PatternMatchingTests3.cs (3)
7454
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "Color.Red.ToArgb()").WithArguments("red").WithLocation(13, 25),
7489
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "Color.Red.ToArgb()").WithArguments("red").WithLocation(13, 25),
7523
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "Color.Red.ToArgb()").WithArguments("red").WithLocation(13, 25));
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (5)
IOperation\IOperationTests_ISymbolInitializer.cs (2)
621
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "M()").WithArguments("C.c1").WithLocation(4, 37)
1001
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "M() ?? M2()").WithArguments("C.c1").WithLocation(4, 37)
IOperation\IOperationTests_IVariableDeclaration.cs (3)
3185
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "GetInt()").WithArguments("i1").WithLocation(6, 34)
3230
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "GetInt()").WithArguments("i1").WithLocation(6, 34),
3233
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "GetInt()").WithArguments("i2").WithLocation(6, 49)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (96)
Semantics\ConstantTests.cs (25)
1725
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "s1").WithArguments("s2").WithLocation(12, 27),
1813
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "default(dynamic)").WithArguments("C.d0"),
1815
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "(dynamic)1").WithArguments("C.d1"),
1817
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "(int)(dynamic)1").WithArguments("C.d2"),
1819
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "1 + (int)(dynamic)1").WithArguments("C.d3"));
3314
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "a()").WithArguments("b").WithLocation(6, 51)
3396
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"(string)(object)""y""").WithArguments("y1").WithLocation(7, 27),
3673
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"$""{""Level 5""} {3}""").WithArguments("S2").WithLocation(7, 27),
3676
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"$""{$""{""Spinning Top"", 10}""}""").WithArguments("S3").WithLocation(8, 27),
3679
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"$""{ParamDefault}""").WithArguments("S4").WithLocation(9, 27),
3682
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"$""{I1}""").WithArguments("F1").WithLocation(11, 27),
3685
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"$""{I1} the {S1}""").WithArguments("F2").WithLocation(12, 27));
3709
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"$""""""{""Level 5""} {3}""""""").WithArguments("S2").WithLocation(7, 27),
3712
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"$""""""{$""{""Spinning Top"", 10}""}""""""").WithArguments("S3").WithLocation(8, 27),
3715
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"$""""""{ParamDefault}""""""").WithArguments("S4").WithLocation(9, 27),
3718
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"$""""""{I1}""""""").WithArguments("F1").WithLocation(11, 27),
3721
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"$""""""{I1} the {S1}""""""").WithArguments("F2").WithLocation(12, 27));
3791
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"""The"" + $""Number {3}"" + ""Level 5""").WithArguments("S1").WithLocation(8, 27),
3794
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"$""Level 4 "" + NC1").WithArguments("S2").WithLocation(9, 27),
3797
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"$""{S1}""").WithArguments("F1").WithLocation(10, 27));
3819
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"""The"" + $""""""Number {3}"""""" + ""Level 5""").WithArguments("S1").WithLocation(8, 27),
3822
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"$""""""Level 4 """""" + NC1").WithArguments("S2").WithLocation(9, 27),
3825
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"$""""""{S1}""""""").WithArguments("F1").WithLocation(10, 27));
3888
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"$""Failed to {VS}""").WithArguments("S6").WithLocation(34, 27));
3924
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"$""Failed to {VS}""").WithArguments("S6").WithLocation(34, 27),
Semantics\FunctionPointerTests.cs (1)
3775
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "null").WithArguments("C.field").WithLocation(4, 35),
Semantics\ImplicitObjectCreationTests.cs (1)
2539
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "new()").WithArguments("x").WithLocation(6, 26),
Semantics\LambdaTests.cs (1)
883
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "((System.Func<int>)(() => 1))()").WithArguments("TestClass.Test.aa"),
Semantics\NativeIntegerTests.cs (24)
4397
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "sizeof(System.IntPtr)").WithArguments("Program.A").WithLocation(3, 19),
4400
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "sizeof(System.UIntPtr)").WithArguments("Program.B").WithLocation(4, 19),
4403
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "sizeof(nint)").WithArguments("Program.C").WithLocation(5, 19),
4406
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "sizeof(nuint)").WithArguments("Program.D").WithLocation(6, 19));
6338
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "checked((nint)x)").WithArguments("y").WithLocation(7, 24),
6388
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "unchecked((nint)x)").WithArguments("y").WithLocation(7, 24));
6897
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "default(System.IntPtr)").WithArguments("Program.A").WithLocation(3, 29),
6903
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "default(System.UIntPtr)").WithArguments("Program.C").WithLocation(5, 30));
13147
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, expr).WithArguments("Library.F")
13152
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, $"checked({expr})").WithArguments("Library.F")
13154
constantDeclaration(opType, declarations, $"unchecked({expr})", null, new[] { Diagnostic(ErrorCode.
ERR_NotConstantExpression
, $"unchecked({expr})").WithArguments("Library.F") });
13166
constantDeclaration(opType, declarations, expr, null, new[] { Diagnostic(ErrorCode.
ERR_NotConstantExpression
, expr).WithArguments("Library.F") });
13167
constantDeclaration(opType, declarations, $"checked({expr})", null, new[] { Diagnostic(ErrorCode.
ERR_NotConstantExpression
, $"checked({expr})").WithArguments("Library.F") });
13168
constantDeclaration(opType, declarations, $"unchecked({expr})", null, new[] { Diagnostic(ErrorCode.
ERR_NotConstantExpression
, $"unchecked({expr})").WithArguments("Library.F") });
13201
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, expr).WithArguments("Library.F")
13206
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, $"checked({expr})").WithArguments("Library.F")
13208
constantDeclaration(opType, declarations, $"unchecked({expr})", null, new[] { Diagnostic(ErrorCode.
ERR_NotConstantExpression
, $"unchecked({expr})").WithArguments("Library.F") });
13220
constantDeclaration(opType, declarations, expr, null, new[] { Diagnostic(ErrorCode.
ERR_NotConstantExpression
, expr).WithArguments("Library.F") });
13221
constantDeclaration(opType, declarations, $"checked({expr})", null, new[] { Diagnostic(ErrorCode.
ERR_NotConstantExpression
, $"checked({expr})").WithArguments("Library.F") });
13222
constantDeclaration(opType, declarations, $"unchecked({expr})", null, new[] { Diagnostic(ErrorCode.
ERR_NotConstantExpression
, $"unchecked({expr})").WithArguments("Library.F") });
13314
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "unchecked(uint.MaxValue + (nuint)42)").WithArguments("x").WithLocation(6, 25),
13317
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "checked(uint.MaxValue + (nuint)42)").WithArguments("y").WithLocation(7, 25),
13379
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "unchecked(-(nint)int.MinValue)").WithArguments("x").WithLocation(6, 24),
13382
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "checked(-(nint)int.MinValue)").WithArguments("y").WithLocation(7, 24),
Semantics\ObjectAndCollectionInitializerTests.cs (1)
2951
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "new int { }").WithArguments("Program.value").WithLocation(4, 33)
Semantics\OutVarTests.cs (16)
5263
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"TakeOutParam(51, out int x5) &&
5268
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "TakeOutParam(6, out int x6) && x6 > 0 ? 1 : 0").WithArguments("X.Test61").WithLocation(12, 14),
5271
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "TakeOutParam(6, out int x6) && x6 > 0 ? 1 : 0").WithArguments("X.Test62").WithLocation(12, 70),
5274
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "TakeOutParam(7, out int x7) && x7 > 0 ? 1 : 0").WithArguments("X.Test71").WithLocation(14, 14),
5280
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "TakeOutParam(3, out int x3) ? x3 : 0").WithArguments("X.Test3").WithLocation(4, 13)
5381
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "TakeOutParam(3, out int x3) && x3 > 0").WithArguments("X.Test3").WithLocation(8, 24),
5390
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"TakeOutParam(51, out int x5) &&
5395
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "TakeOutParam(6, out int x6) && x6 > 0").WithArguments("X.Test61").WithLocation(16, 25),
5398
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "TakeOutParam(6, out int x6) && x6 > 0").WithArguments("X.Test62").WithLocation(16, 73),
5401
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "TakeOutParam(7, out int x7) && x7 > 0").WithArguments("X.Test71").WithLocation(18, 25),
31964
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "H.TakeOutParam(1, out var x1)").WithArguments("b").WithLocation(3, 20),
31995
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "H.TakeOutParam(1, out var x1)").WithArguments("<invalid-global-code>.b").WithLocation(3, 20),
34975
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "M(nameof(M(out var z2)), z2)").WithArguments("C.b").WithLocation(5, 20),
34987
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "M(nameof(M(out int z1)), z1)").WithArguments("C.a").WithLocation(4, 20)
35029
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "M(nameof(M(out int z1)), z1)").WithArguments("a").WithLocation(6, 24),
35035
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "M(nameof(M(out var z2)), z2)").WithArguments("b").WithLocation(7, 24),
Semantics\PrimaryConstructorTests.cs (3)
2602
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "X + 1").WithArguments("C.Z").WithLocation(6, 19)
7272
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "p1").WithArguments("C1.F").WithLocation(2000, 1)
7357
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "p1").WithArguments("C1.F").WithLocation(2000, 1)
Semantics\RecordStructTests.cs (1)
2657
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "X + 1").WithArguments("C.Z").WithLocation(4, 19)
Semantics\RecordTests.cs (2)
24717
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "X + 1").WithArguments("C.Z").WithLocation(4, 19)
29546
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "P").WithArguments("C2.P").WithLocation(8, 19)
Semantics\SemanticErrorTests.cs (5)
3846
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "c").WithArguments("MyClass.b").WithLocation(4, 25));
3877
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "C.F()").WithArguments("E.Y").WithLocation(4, 9),
3880
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "C.G() + 1").WithArguments("E.Z").WithLocation(5, 9));
3899
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "2 * y").WithArguments("x").WithLocation(6, 23));
17105
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "from x in new int[] { 1, 2, 3 } select x").WithArguments("P.e")
Semantics\StructConstructorTests.cs (6)
3625
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "default(S0)").WithArguments("Program.d0").WithLocation(14, 23),
3628
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "default(S1)").WithArguments("Program.d1").WithLocation(15, 23),
3631
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "default(S2)").WithArguments("Program.d2").WithLocation(16, 23),
3634
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "new S0()").WithArguments("Program.s0").WithLocation(17, 23),
3637
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "new S1()").WithArguments("Program.s1").WithLocation(18, 23),
3640
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "new S2()").WithArguments("Program.s2").WithLocation(19, 23));
Semantics\TargetTypedDefaultTests.cs (9)
1087
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "(T)default").WithArguments("z").WithLocation(8, 26)
1117
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "(S)default").WithArguments("z").WithLocation(9, 26)
3648
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "default(int?)").WithArguments("C<T>.x2").WithLocation(6, 21),
3651
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "(default)").WithArguments("C<T>.x3").WithLocation(7, 21),
3654
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "default").WithArguments("C<T>.y1").WithLocation(8, 19),
3657
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "default(S?)").WithArguments("C<T>.y2").WithLocation(9, 19),
3660
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "default").WithArguments("C<T>.z1").WithLocation(10, 19),
3663
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "default(T?)").WithArguments("C<T>.z2").WithLocation(11, 19),
3666
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "default").WithArguments("C<T>.x1").WithLocation(5, 21)
Semantics\Utf8StringsLiteralsTests.cs (1)
2547
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"""07""U8").WithArguments("C.x").WithLocation(5, 34),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (3)
Symbols\SymbolErrorTests.cs (2)
15526
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "var1").WithArguments("s._Type3"));
15566
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, @"System.Convert.ToInt32(@""1"")").WithArguments("s._Type4"));
Symbols\UnsignedRightShiftTests.cs (1)
527
Diagnostic(ErrorCode.
ERR_NotConstantExpression
, "x >>> 1").WithArguments("y").WithLocation(9, 24)