Class ConversionFact
A let-coercion (MS-VBAL 5.5.1.2) that the code asks for, as the language core states it.
public sealed record ConversionFact : IEquatable<ConversionFact>
- Inheritance
-
ConversionFact
- Implements
- Inherited Members
Remarks
👉 A fact is stated only when it is true of the code: anything that follows from a value an analysis only assumed (IsValueKnown is false) is not stated, so Error is null then, and Flags holds what the types alone say.
Constructors
ConversionFact(SyntaxNodeId, SourceLocation, ConversionSite, InputIndex, VBType, VBType, ConversionSemanticFlags, bool, VBErrorInfo?)
A let-coercion (MS-VBAL 5.5.1.2) that the code asks for, as the language core states it.
public ConversionFact(SyntaxNodeId Node, SourceLocation Location, ConversionSite Site, InputIndex Operand, VBType Source, VBType Destination, ConversionSemanticFlags Flags, bool IsValueKnown, VBErrorInfo? Error)
Parameters
NodeSyntaxNodeIdThe
Identityof the syntax node the conversion is evaluated for.LocationSourceLocationWhere in the document the conversion is.
SiteConversionSiteThe construct that asks for the conversion.
OperandInputIndexThe operand that is converted: its position in the operation that converts it.
SourceVBTypeThe declared type of the value that is converted.
DestinationVBTypeThe type it is converted to.
FlagsConversionSemanticFlagsWhat the conversion does, and what is known about its source (
Narrowing,Lossy,NullOperand, ...). Always one ofImplicitorExplicit.IsValueKnownboolWhether the value that is converted is known, as opposed to a value the type merely allows.
ErrorVBErrorInfoThe run-time error the conversion raises. Only stated when the value is known, or when the types alone guarantee it.
Remarks
👉 A fact is stated only when it is true of the code: anything that follows from a value an analysis only assumed (IsValueKnown is false) is not stated, so Error is null then, and Flags holds what the types alone say.
Properties
Destination
The type it is converted to.
public VBType Destination { get; init; }
Property Value
Error
The run-time error the conversion raises. Only stated when the value is known, or when the types alone guarantee it.
public VBErrorInfo? Error { get; init; }
Property Value
Flags
What the conversion does, and what is known about its source (Narrowing, Lossy, NullOperand, ...).
Always one of Implicit or Explicit.
public ConversionSemanticFlags Flags { get; init; }
Property Value
IsValueKnown
Whether the value that is converted is known, as opposed to a value the type merely allows.
public bool IsValueKnown { get; init; }
Property Value
Location
Where in the document the conversion is.
public SourceLocation Location { get; init; }
Property Value
Node
The Identity of the syntax node the conversion is evaluated for.
public SyntaxNodeId Node { get; init; }
Property Value
Operand
The operand that is converted: its position in the operation that converts it.
public InputIndex Operand { get; init; }
Property Value
Site
The construct that asks for the conversion.
public ConversionSite Site { get; init; }
Property Value
Source
The declared type of the value that is converted.
public VBType Source { get; init; }