87 references to Bad
Microsoft.CodeAnalysis (14)
Compilation\Expression.cs (1)
46
return ConstantValue.
Bad
;
ConstantValue.cs (1)
406
case ConstantValueTypeDiscriminator.Bad: return
Bad
;
EnumConstantHelper.cs (1)
25
offsetValue = ConstantValue.
Bad
;
MetadataReader\MetadataDecoder.cs (4)
1022
value = (type.IsReferenceType || type.TypeKind == TypeKind.Pointer || type.TypeKind == TypeKind.FunctionPointer) ? ConstantValue.Null : ConstantValue.
Bad
;
1026
value = ConstantValue.
Bad
;
1116
return ConstantValue.
Bad
;
1124
return ConstantValue.
Bad
;
MetadataReader\PEModule.cs (6)
1381
defaultValue = ConstantValue.
Bad
;
3313
return constantHandle.IsNil ? ConstantValue.
Bad
: GetConstantValueOrThrow(constantHandle);
3317
return ConstantValue.
Bad
;
3330
return constantHandle.IsNil ? ConstantValue.
Bad
: GetConstantValueOrThrow(constantHandle);
3334
return ConstantValue.
Bad
;
3482
return ConstantValue.
Bad
;
Symbols\Attributes\CommonAttributeData.cs (1)
242
return ConstantValue.
Bad
;
Microsoft.CodeAnalysis.CSharp (36)
Binder\Binder_Conversions.cs (3)
1665
return ConstantValue.
Bad
;
1673
return ConstantValue.
Bad
;
1689
return ConstantValue.
Bad
;
Binder\Binder_Expressions.cs (1)
7504
constantValueOpt = ConstantValue.
Bad
;
Binder\Binder_Operators.cs (11)
1783
return ConstantValue.
Bad
;
1795
return ConstantValue.
Bad
;
1834
return ConstantValue.
Bad
;
1870
return ConstantValue.
Bad
;
2184
return (newLength > int.MaxValue) ? ConstantValue.
Bad
: ConstantValue.CreateFromRope(Rope.Concat(leftValue, rightValue));
2860
return ConstantValue.
Bad
;
3206
node.Right, convertedExpression, constantValueOpt ?? ConstantValue.
Bad
, operand.Type, convertedExpression.Type ?? operand.Type, hasErrors)
3339
/// - <see cref="ConstantValue.
Bad
"/> - compiler doesn't support the type check, i.e. cannot perform it, even at runtime
3475
return ConstantValue.
Bad
;
3866
/// - <see cref="ConstantValue.
Bad
"/> - compiler doesn't support the type check, i.e. cannot perform it, even at runtime
4358
return ConstantValue.
Bad
;
Binder\Binder_Patterns.cs (6)
440
node, convertedExpression, constantValueOpt ?? ConstantValue.
Bad
, inputType, convertedType, hasErrors || constantValueOpt is null);
612
if (match == ConstantValue.False || match == ConstantValue.
Bad
)
759
if (matchPossible != ConstantValue.False && matchPossible != ConstantValue.
Bad
)
790
/// - <see cref="ConstantValue.
Bad
"/> - compiler doesn't support the type check, i.e. cannot perform it, even at runtime
822
Debug.Assert(!conversion.IsUserDefined || result == ConstantValue.False || result == ConstantValue.
Bad
);
1657
constantValueOpt = ConstantValue.
Bad
;
Binder\Binder_Statements.cs (2)
2213
else if (conversion.Kind == ConversionKind.ExplicitNumeric && sourceConstantValueOpt != null && sourceConstantValueOpt != ConstantValue.
Bad
&&
2214
ConversionsBase.HasImplicitConstantExpressionConversion(new BoundLiteral(syntax, ConstantValue.
Bad
, sourceType), targetType))
Symbols\ConstantValueUtils.cs (1)
86
var value = ConstantValue.
Bad
;
Symbols\ReducedExtensionMethodSymbol.cs (2)
139
var thisArgumentValue = new BoundLiteral(syntax, ConstantValue.
Bad
, thisType) { WasCompilerGenerated = true };
141
var otherArgumentValue = new BoundLiteral(syntax, ConstantValue.
Bad
, otherArgumentType) { WasCompilerGenerated = true };
Symbols\Source\SourceComplexParameterSymbol.cs (7)
380
return ConstantValue.
Bad
;
387
return ConstantValue.
Bad
;
708
value = ConstantValue.
Bad
;
946
return ConstantValue.
Bad
;
984
return ConstantValue.
Bad
;
994
return ConstantValue.
Bad
;
1005
return ConstantValue.
Bad
;
Symbols\Source\SourceEnumConstantSymbol.cs (1)
209
return Microsoft.CodeAnalysis.ConstantValue.
Bad
;
Symbols\Source\SourceLocalSymbol.cs (2)
561
var value = Microsoft.CodeAnalysis.ConstantValue.
Bad
;
586
return Microsoft.CodeAnalysis.ConstantValue.
Bad
;
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\ConstantTests.cs (1)
4005
badConst = ConstantValue.
Bad
,
Semantics\NamedAndOptionalTests.cs (1)
2463
Assert.Equal(ConstantValue.
Bad
, param.ExplicitDefaultConstantValue);
Utilities\ValueSetTests.cs (1)
875
ConstantValue badConstant = ConstantValue.
Bad
;
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (16)
Compilation\GetSemanticInfoTests.cs (16)
893
EnumOffset(ConstantValue.Create((sbyte)(sbyte.MaxValue - 3)), 4, EnumOverflowKind.OverflowReport, ConstantValue.
Bad
);
894
EnumOffset(ConstantValue.Create((sbyte)(sbyte.MaxValue - 3)), 5, EnumOverflowKind.OverflowIgnore, ConstantValue.
Bad
);
900
EnumOffset(ConstantValue.Create((byte)(byte.MaxValue - 3)), 4, EnumOverflowKind.OverflowReport, ConstantValue.
Bad
);
901
EnumOffset(ConstantValue.Create((byte)(byte.MaxValue - 3)), 5, EnumOverflowKind.OverflowIgnore, ConstantValue.
Bad
);
909
EnumOffset(ConstantValue.Create((short)(short.MaxValue - 3)), 4, EnumOverflowKind.OverflowReport, ConstantValue.
Bad
);
910
EnumOffset(ConstantValue.Create((short)(short.MaxValue - 3)), 5, EnumOverflowKind.OverflowIgnore, ConstantValue.
Bad
);
916
EnumOffset(ConstantValue.Create((ushort)(ushort.MaxValue - 3)), 4, EnumOverflowKind.OverflowReport, ConstantValue.
Bad
);
917
EnumOffset(ConstantValue.Create((ushort)(ushort.MaxValue - 3)), 5, EnumOverflowKind.OverflowIgnore, ConstantValue.
Bad
);
925
EnumOffset(ConstantValue.Create((int)(int.MaxValue - 3)), 4, EnumOverflowKind.OverflowReport, ConstantValue.
Bad
);
926
EnumOffset(ConstantValue.Create((int)(int.MaxValue - 3)), 5, EnumOverflowKind.OverflowIgnore, ConstantValue.
Bad
);
932
EnumOffset(ConstantValue.Create((uint)(uint.MaxValue - 3)), 4, EnumOverflowKind.OverflowReport, ConstantValue.
Bad
);
933
EnumOffset(ConstantValue.Create((uint)(uint.MaxValue - 3)), 5, EnumOverflowKind.OverflowIgnore, ConstantValue.
Bad
);
941
EnumOffset(ConstantValue.Create((long)(long.MaxValue - 3)), 4, EnumOverflowKind.OverflowReport, ConstantValue.
Bad
);
942
EnumOffset(ConstantValue.Create((long)(long.MaxValue - 3)), 5, EnumOverflowKind.OverflowIgnore, ConstantValue.
Bad
);
948
EnumOffset(ConstantValue.Create((ulong)(ulong.MaxValue - 3)), 4, EnumOverflowKind.OverflowReport, ConstantValue.
Bad
);
949
EnumOffset(ConstantValue.Create((ulong)(ulong.MaxValue - 3)), 5, EnumOverflowKind.OverflowIgnore, ConstantValue.
Bad
);
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
PDB\PdbHelpers.cs (1)
108
_ => ConstantValue.
Bad
,
Microsoft.CodeAnalysis.UnitTests (1)
CorLibTypesTests.cs (1)
113
Assert.Equal(ConstantValue.
Bad
, ConstantValue.Default(ConstantValueTypeDiscriminator.Bad));
Microsoft.CodeAnalysis.VisualBasic (16)
Binding\Binder_Operators.vb (2)
515
value = ConstantValue.
Bad
1199
constantValue = constantValue.
Bad
Semantics\CompileTimeCalculations.vb (3)
430
Return ConstantValue.
Bad
512
Return ConstantValue.
Bad
712
value = ConstantValue.
Bad
Semantics\Operators.vb (4)
1285
result = ConstantValue.
Bad
1493
result = ConstantValue.
Bad
1523
Return ConstantValue.
Bad
1529
Return ConstantValue.
Bad
Symbols\ConstantValueUtils.vb (1)
49
Dim value As ConstantValue = If(constValue, ConstantValue.
Bad
)
Symbols\Metadata\PE\PEFieldSymbol.vb (2)
260
value = Microsoft.CodeAnalysis.ConstantValue.
Bad
266
value = Microsoft.CodeAnalysis.ConstantValue.
Bad
Symbols\Source\SourceEnumConstantSymbol.vb (1)
142
Dim value As ConstantValue = Microsoft.CodeAnalysis.ConstantValue.
Bad
Symbols\Source\SourceFieldSymbol.vb (1)
196
Return CodeAnalysis.ConstantValue.
Bad
Symbols\Source\SourceParameterSymbol.vb (2)
305
value = ConstantValue.
Bad
433
Return ConstantValue.
Bad