55 references to Bad
Microsoft.CodeAnalysis (14)
Compilation\Expression.cs (1)
46return ConstantValue.Bad;
ConstantValue.cs (1)
410case ConstantValueTypeDiscriminator.Bad: return Bad;
EnumConstantHelper.cs (1)
25offsetValue = ConstantValue.Bad;
MetadataReader\MetadataDecoder.cs (4)
1022value = (type.IsReferenceType || type.TypeKind == TypeKind.Pointer || type.TypeKind == TypeKind.FunctionPointer) ? ConstantValue.Null : ConstantValue.Bad; 1026value = ConstantValue.Bad; 1116return ConstantValue.Bad; 1124return ConstantValue.Bad;
MetadataReader\PEModule.cs (6)
1634defaultValue = ConstantValue.Bad; 3621return constantHandle.IsNil ? ConstantValue.Bad : GetConstantValueOrThrow(constantHandle); 3625return ConstantValue.Bad; 3638return constantHandle.IsNil ? ConstantValue.Bad : GetConstantValueOrThrow(constantHandle); 3642return ConstantValue.Bad; 3790return ConstantValue.Bad;
Symbols\Attributes\CommonAttributeData.cs (1)
246return ConstantValue.Bad;
Microsoft.CodeAnalysis.CSharp (41)
Binder\Binder_Conversions.cs (3)
3933return ConstantValue.Bad; 3941return ConstantValue.Bad; 3957return ConstantValue.Bad;
Binder\Binder_Expressions.cs (1)
9877constantValueOpt = ConstantValue.Bad;
Binder\Binder_Operators.cs (12)
2785return ConstantValue.Bad; 2797return ConstantValue.Bad; 2836return ConstantValue.Bad; 2872return ConstantValue.Bad; 3209return (newLength > int.MaxValue) ? ConstantValue.Bad : ConstantValue.CreateFromRope(Rope.Concat(leftValue, rightValue)); 4531return ConstantValue.Bad; 4889node.Right, convertedExpression, constantValueOpt ?? ConstantValue.Bad, isUnionMatching: unionMatchingInputType is not null, inputType: unionMatchingInputType ?? inputType, convertedExpression.Type ?? inputType, hasErrors).MakeCompilerGenerated(); 5037/// - <see cref="ConstantValue.Bad"/> - compiler doesn't support the type check, i.e. cannot perform it, even at runtime 5202return ConstantValue.Bad; 5594/// - <see cref="ConstantValue.Bad"/> - compiler doesn't support the type check, i.e. cannot perform it, even at runtime 5616return ConstantValue.Bad; 6082return ConstantValue.Bad;
Binder\Binder_Patterns.cs (9)
1023node, convertedExpression, constantValueOpt ?? ConstantValue.Bad, isUnionMatching: hasUnionMatching, inputType: unionMatchingInputType ?? inputType, convertedType, hasErrors || constantValueOpt is null); 1219if (match == ConstantValue.False || match == ConstantValue.Bad) 1353constantValue = ConstantValue.Bad; 1443if (matchPossible != ConstantValue.False && matchPossible != ConstantValue.Bad) 1478ConstantValue matchPossible = ConstantValue.Bad; 1487if (matchPossible != ConstantValue.False && matchPossible != ConstantValue.Bad) 1501/// - <see cref="ConstantValue.Bad"/> - compiler doesn't support the type check, i.e. cannot perform it, even at runtime 1533Debug.Assert((!conversion.IsUserDefined && !conversion.IsUnion) || result == ConstantValue.False || result == ConstantValue.Bad); 2494constantValueOpt = ConstantValue.Bad;
Binder\Binder_Statements.cs (2)
2296else if (conversion.Kind == ConversionKind.ExplicitNumeric && sourceConstantValueOpt != null && sourceConstantValueOpt != ConstantValue.Bad && 2297ConversionsBase.HasImplicitConstantExpressionConversion(new BoundLiteral(syntax, ConstantValue.Bad, sourceType), targetType))
Symbols\ConstantValueUtils.cs (1)
85var value = ConstantValue.Bad;
Symbols\ReducedExtensionMethodSymbol.cs (2)
145var thisArgumentValue = new BoundLiteral(syntax, ConstantValue.Bad, thisType) { WasCompilerGenerated = true }; 147var otherArgumentValue = new BoundLiteral(syntax, ConstantValue.Bad, otherArgumentType) { WasCompilerGenerated = true };
Symbols\Source\SourceComplexParameterSymbol.cs (7)
394return ConstantValue.Bad; 401return ConstantValue.Bad; 742value = ConstantValue.Bad; 988return ConstantValue.Bad; 1026return ConstantValue.Bad; 1036return ConstantValue.Bad; 1047return ConstantValue.Bad;
Symbols\Source\SourceEnumConstantSymbol.cs (1)
215return Microsoft.CodeAnalysis.ConstantValue.Bad;
Symbols\Source\SourceLocalSymbol.cs (2)
675var value = Microsoft.CodeAnalysis.ConstantValue.Bad; 698return Microsoft.CodeAnalysis.ConstantValue.Bad;
Symbols\Source\SourceNamedTypeSymbol_Extension.cs (1)
1227var receiverValue = new BoundLiteral(syntax, ConstantValue.Bad, receiverType) { WasCompilerGenerated = true };