31 references to ERR_BadConstType
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder_Statements.cs (1)
854
Error(diagnostics, ErrorCode.
ERR_BadConstType
, typeSyntax, declType.Type);
Errors\ErrorFacts.cs (1)
848
or ErrorCode.
ERR_BadConstType
Symbols\Source\SourceMemberFieldSymbol.cs (1)
89
diagnostics.Add(ErrorCode.
ERR_BadConstType
, constToken.GetLocation(), type);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (1)
CodeGen\CodeGenReadOnlySpanConstructionTest.cs (1)
3244
Diagnostic(ErrorCode.
ERR_BadConstType
, "const").WithArguments("System.DateTime").WithLocation(6, 28),
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (26)
Semantics\ConstantTests.cs (2)
1716
Diagnostic(ErrorCode.
ERR_BadConstType
, "S").WithArguments("C.S").WithLocation(7, 15),
4193
Diagnostic(ErrorCode.
ERR_BadConstType
, "S").WithArguments("S").WithLocation(1, 7));
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)
3793
Diagnostic(ErrorCode.
ERR_BadConstType
, "const").WithArguments("delegate*<void>").WithLocation(4, 5),
3799
Diagnostic(ErrorCode.
ERR_BadConstType
, "delegate*<void>").WithArguments("delegate*<void>").WithLocation(7, 15)
Semantics\NativeIntegerTests.cs (4)
6904
Diagnostic(ErrorCode.
ERR_BadConstType
, "System.IntPtr").WithArguments("System.IntPtr").WithLocation(6, 15),
6907
Diagnostic(ErrorCode.
ERR_BadConstType
, "System.UIntPtr").WithArguments("System.UIntPtr").WithLocation(8, 15));
6925
Diagnostic(ErrorCode.
ERR_BadConstType
, "const").WithArguments("System.IntPtr").WithLocation(3, 5),
6931
Diagnostic(ErrorCode.
ERR_BadConstType
, "const").WithArguments("System.UIntPtr").WithLocation(5, 5),
Semantics\SemanticErrorTests.cs (1)
9738
Diagnostic(ErrorCode.
ERR_BadConstType
, "S").WithArguments("S").WithLocation(5, 15),
Semantics\StackAllocInitializerTests.cs (3)
1623
Diagnostic(ErrorCode.
ERR_BadConstType
, "int*").WithArguments("int*").WithLocation(6, 15),
1626
Diagnostic(ErrorCode.
ERR_BadConstType
, "int*").WithArguments("int*").WithLocation(7, 15),
1629
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)
2551
Diagnostic(ErrorCode.
ERR_BadConstType
, "ReadOnlySpan<byte>").WithArguments("System.ReadOnlySpan<byte>").WithLocation(9, 15)
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (1)
Parsing\ParserErrorMessageTests.cs (1)
4740
Diagnostic(ErrorCode.
ERR_BadConstType
, "int*").WithArguments("int*").WithLocation(6, 15)