76 references to Bad
Microsoft.CodeAnalysis (14)
Compilation\Expression.cs (1)
46
return ConstantValue.
Bad
;
ConstantValue.cs (1)
410
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)
1633
defaultValue = ConstantValue.
Bad
;
3620
return constantHandle.IsNil ? ConstantValue.
Bad
: GetConstantValueOrThrow(constantHandle);
3624
return ConstantValue.
Bad
;
3637
return constantHandle.IsNil ? ConstantValue.
Bad
: GetConstantValueOrThrow(constantHandle);
3641
return ConstantValue.
Bad
;
3789
return ConstantValue.
Bad
;
Symbols\Attributes\CommonAttributeData.cs (1)
247
return ConstantValue.
Bad
;
Microsoft.CodeAnalysis.CSharp (41)
Binder\Binder_Conversions.cs (3)
3863
return ConstantValue.
Bad
;
3871
return ConstantValue.
Bad
;
3887
return ConstantValue.
Bad
;
Binder\Binder_Expressions.cs (1)
9201
constantValueOpt = ConstantValue.
Bad
;
Binder\Binder_Operators.cs (12)
2785
return ConstantValue.
Bad
;
2797
return ConstantValue.
Bad
;
2836
return ConstantValue.
Bad
;
2872
return ConstantValue.
Bad
;
3186
return (newLength > int.MaxValue) ? ConstantValue.
Bad
: ConstantValue.CreateFromRope(Rope.Concat(leftValue, rightValue));
4506
return ConstantValue.
Bad
;
4885
node.Right, convertedExpression, constantValueOpt ?? ConstantValue.
Bad
, isUnionMatching: unionMatchingInputType is not null, inputType: unionMatchingInputType ?? inputType, convertedExpression.Type ?? inputType, hasErrors).MakeCompilerGenerated();
5034
/// - <see cref="ConstantValue.
Bad
"/> - compiler doesn't support the type check, i.e. cannot perform it, even at runtime
5199
return ConstantValue.
Bad
;
5591
/// - <see cref="ConstantValue.
Bad
"/> - compiler doesn't support the type check, i.e. cannot perform it, even at runtime
5613
return ConstantValue.
Bad
;
6079
return ConstantValue.
Bad
;
Binder\Binder_Patterns.cs (9)
685
node, convertedExpression, constantValueOpt ?? ConstantValue.
Bad
, isUnionMatching: hasUnionMatching, inputType: unionMatchingInputType ?? inputType, convertedType, hasErrors || constantValueOpt is null);
879
if (match == ConstantValue.False || match == ConstantValue.
Bad
)
1010
constantValue = ConstantValue.
Bad
;
1100
if (matchPossible != ConstantValue.False && matchPossible != ConstantValue.
Bad
)
1135
ConstantValue matchPossible = ConstantValue.
Bad
;
1144
if (matchPossible != ConstantValue.False && matchPossible != ConstantValue.
Bad
)
1158
/// - <see cref="ConstantValue.
Bad
"/> - compiler doesn't support the type check, i.e. cannot perform it, even at runtime
1190
Debug.Assert((!conversion.IsUserDefined && !conversion.IsUnion) || result == ConstantValue.False || result == ConstantValue.
Bad
);
2102
constantValueOpt = ConstantValue.
Bad
;
Binder\Binder_Statements.cs (2)
2295
else if (conversion.Kind == ConversionKind.ExplicitNumeric && sourceConstantValueOpt != null && sourceConstantValueOpt != ConstantValue.
Bad
&&
2296
ConversionsBase.HasImplicitConstantExpressionConversion(new BoundLiteral(syntax, ConstantValue.
Bad
, sourceType), targetType))
Symbols\ConstantValueUtils.cs (1)
85
var value = ConstantValue.
Bad
;
Symbols\ReducedExtensionMethodSymbol.cs (2)
145
var thisArgumentValue = new BoundLiteral(syntax, ConstantValue.
Bad
, thisType) { WasCompilerGenerated = true };
147
var otherArgumentValue = new BoundLiteral(syntax, ConstantValue.
Bad
, otherArgumentType) { WasCompilerGenerated = true };
Symbols\Source\SourceComplexParameterSymbol.cs (7)
394
return ConstantValue.
Bad
;
401
return ConstantValue.
Bad
;
742
value = ConstantValue.
Bad
;
993
return ConstantValue.
Bad
;
1031
return ConstantValue.
Bad
;
1041
return ConstantValue.
Bad
;
1052
return ConstantValue.
Bad
;
Symbols\Source\SourceEnumConstantSymbol.cs (1)
213
return Microsoft.CodeAnalysis.ConstantValue.
Bad
;
Symbols\Source\SourceLocalSymbol.cs (2)
675
var value = Microsoft.CodeAnalysis.ConstantValue.
Bad
;
698
return Microsoft.CodeAnalysis.ConstantValue.
Bad
;
Symbols\Source\SourceNamedTypeSymbol_Extension.cs (1)
1227
var receiverValue = new BoundLiteral(syntax, ConstantValue.
Bad
, receiverType) { WasCompilerGenerated = true };
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (3)
Semantics\ConstantTests.cs (1)
4024
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)
894
EnumOffset(ConstantValue.Create((sbyte)(sbyte.MaxValue - 3)), 4, EnumOverflowKind.OverflowReport, ConstantValue.
Bad
);
895
EnumOffset(ConstantValue.Create((sbyte)(sbyte.MaxValue - 3)), 5, EnumOverflowKind.OverflowIgnore, ConstantValue.
Bad
);
901
EnumOffset(ConstantValue.Create((byte)(byte.MaxValue - 3)), 4, EnumOverflowKind.OverflowReport, ConstantValue.
Bad
);
902
EnumOffset(ConstantValue.Create((byte)(byte.MaxValue - 3)), 5, EnumOverflowKind.OverflowIgnore, ConstantValue.
Bad
);
910
EnumOffset(ConstantValue.Create((short)(short.MaxValue - 3)), 4, EnumOverflowKind.OverflowReport, ConstantValue.
Bad
);
911
EnumOffset(ConstantValue.Create((short)(short.MaxValue - 3)), 5, EnumOverflowKind.OverflowIgnore, ConstantValue.
Bad
);
917
EnumOffset(ConstantValue.Create((ushort)(ushort.MaxValue - 3)), 4, EnumOverflowKind.OverflowReport, ConstantValue.
Bad
);
918
EnumOffset(ConstantValue.Create((ushort)(ushort.MaxValue - 3)), 5, EnumOverflowKind.OverflowIgnore, ConstantValue.
Bad
);
926
EnumOffset(ConstantValue.Create((int)(int.MaxValue - 3)), 4, EnumOverflowKind.OverflowReport, ConstantValue.
Bad
);
927
EnumOffset(ConstantValue.Create((int)(int.MaxValue - 3)), 5, EnumOverflowKind.OverflowIgnore, ConstantValue.
Bad
);
933
EnumOffset(ConstantValue.Create((uint)(uint.MaxValue - 3)), 4, EnumOverflowKind.OverflowReport, ConstantValue.
Bad
);
934
EnumOffset(ConstantValue.Create((uint)(uint.MaxValue - 3)), 5, EnumOverflowKind.OverflowIgnore, ConstantValue.
Bad
);
942
EnumOffset(ConstantValue.Create((long)(long.MaxValue - 3)), 4, EnumOverflowKind.OverflowReport, ConstantValue.
Bad
);
943
EnumOffset(ConstantValue.Create((long)(long.MaxValue - 3)), 5, EnumOverflowKind.OverflowIgnore, ConstantValue.
Bad
);
949
EnumOffset(ConstantValue.Create((ulong)(ulong.MaxValue - 3)), 4, EnumOverflowKind.OverflowReport, ConstantValue.
Bad
);
950
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)
157
Assert.Equal(ConstantValue.
Bad
, ConstantValue.Default(ConstantValueTypeDiscriminator.Bad));