29 references to ERR_BadConstType
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder_Statements.cs (1)
855
Error(diagnostics, ErrorCode.
ERR_BadConstType
, typeSyntax, declType.Type);
Errors\ErrorFacts.cs (1)
786
case ErrorCode.
ERR_BadConstType
:
Symbols\Source\SourceMemberFieldSymbol.cs (1)
83
diagnostics.Add(ErrorCode.
ERR_BadConstType
, constToken.GetLocation(), type);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (25)
Semantics\ConstantTests.cs (1)
1716
Diagnostic(ErrorCode.
ERR_BadConstType
, "S").WithArguments("C.S").WithLocation(7, 15),
Semantics\DeconstructionTests.cs (1)
4014
Diagnostic(ErrorCode.
ERR_BadConstType
, "(int x, int y)").WithArguments("(int x, int y)").WithLocation(6, 25)
Semantics\FunctionPointerTests.cs (2)
3772
Diagnostic(ErrorCode.
ERR_BadConstType
, "const").WithArguments("delegate*<void>").WithLocation(4, 5),
3778
Diagnostic(ErrorCode.
ERR_BadConstType
, "delegate*<void>").WithArguments("delegate*<void>").WithLocation(7, 15)
Semantics\NativeIntegerTests.cs (4)
6873
Diagnostic(ErrorCode.
ERR_BadConstType
, "System.IntPtr").WithArguments("System.IntPtr").WithLocation(6, 15),
6876
Diagnostic(ErrorCode.
ERR_BadConstType
, "System.UIntPtr").WithArguments("System.UIntPtr").WithLocation(8, 15));
6894
Diagnostic(ErrorCode.
ERR_BadConstType
, "const").WithArguments("System.IntPtr").WithLocation(3, 5),
6900
Diagnostic(ErrorCode.
ERR_BadConstType
, "const").WithArguments("System.UIntPtr").WithLocation(5, 5),
Semantics\SemanticErrorTests.cs (1)
9734
Diagnostic(ErrorCode.
ERR_BadConstType
, "S").WithArguments("S").WithLocation(5, 15),
Semantics\StackAllocInitializerTests.cs (3)
1607
Diagnostic(ErrorCode.
ERR_BadConstType
, "int*").WithArguments("int*").WithLocation(6, 15),
1610
Diagnostic(ErrorCode.
ERR_BadConstType
, "int*").WithArguments("int*").WithLocation(7, 15),
1613
Diagnostic(ErrorCode.
ERR_BadConstType
, "int*").WithArguments("int*").WithLocation(8, 15)
Semantics\StackAllocSpanExpressionsTests.cs (1)
474
Diagnostic(ErrorCode.
ERR_BadConstType
, "int*").WithArguments("int*").WithLocation(6, 15));
Semantics\TargetTypedDefaultTests.cs (11)
1081
Diagnostic(ErrorCode.
ERR_BadConstType
, "T").WithArguments("T").WithLocation(6, 15),
1084
Diagnostic(ErrorCode.
ERR_BadConstType
, "T").WithArguments("T").WithLocation(7, 15),
1111
Diagnostic(ErrorCode.
ERR_BadConstType
, "S").WithArguments("S").WithLocation(7, 15),
1114
Diagnostic(ErrorCode.
ERR_BadConstType
, "S").WithArguments("S").WithLocation(8, 15),
3627
Diagnostic(ErrorCode.
ERR_BadConstType
, "const").WithArguments("int?").WithLocation(5, 5),
3630
Diagnostic(ErrorCode.
ERR_BadConstType
, "const").WithArguments("int?").WithLocation(6, 5),
3633
Diagnostic(ErrorCode.
ERR_BadConstType
, "const").WithArguments("int?").WithLocation(7, 5),
3636
Diagnostic(ErrorCode.
ERR_BadConstType
, "const").WithArguments("S?").WithLocation(8, 5),
3639
Diagnostic(ErrorCode.
ERR_BadConstType
, "const").WithArguments("S?").WithLocation(9, 5),
3642
Diagnostic(ErrorCode.
ERR_BadConstType
, "const").WithArguments("T?").WithLocation(10, 5),
3645
Diagnostic(ErrorCode.
ERR_BadConstType
, "const").WithArguments("T?").WithLocation(11, 5),
Semantics\Utf8StringsLiteralsTests.cs (1)
2550
Diagnostic(ErrorCode.
ERR_BadConstType
, "ReadOnlySpan<byte>").WithArguments("System.ReadOnlySpan<byte>").WithLocation(9, 15)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Parsing\ParserErrorMessageTests.cs (1)
4901
Diagnostic(ErrorCode.
ERR_BadConstType
, "int*").WithArguments("int*").WithLocation(6, 15)