Table of Contents

Class SetCoercionStaticSemantics

Namespace
RDCore.SDK.Semantics.Static
Assembly
RDCore.SDK.dll

MS-VBAL 5.5.2.1 Set-coercion (static semantics)

public record SetCoercionStaticSemantics : StaticSemantics, IStaticSemantics, IEquatable<StaticSemantics>, IEquatable<SetCoercionStaticSemantics>
Inheritance
SetCoercionStaticSemantics
Implements
Inherited Members

Remarks

Considerably thinner than LetCoercionStaticSemantics's table: Set-coercion only ever moves object references around, so the static table is just two rows — is the destination even object-ish (a specific class, Object, or Variant), and if so, is the source too? MS-VBAL 5.5.2.1 deliberately stops there: whether a source class actually implements or derives from the destination's declared class is a runtime-semantics question (5.5.2.2.1, runtime error 13 on mismatch), not a static one — Supertypes has no role to play here.

Properties

Instance

public static IStaticSemantics Instance { get; }

Property Value

IStaticSemantics

Methods

DetermineDeclaredType(StaticEvaluationContext, ExpressionNode, params VBType[])

Determines a static VBType from specified operands.

public override StaticSemanticsEvaluationResult DetermineDeclaredType(StaticEvaluationContext context, ExpressionNode expression, params VBType[] operandDeclaredTypes)

Parameters

context StaticEvaluationContext

The compile-time context this expression is evaluated against.

expression ExpressionNode

The expression node being evaluated.

operandDeclaredTypes VBType[]

The declared type of each operand involved in the evaluation.

Returns

StaticSemanticsEvaluationResult

A StaticSemanticsEvaluationResult encapsulating the resulting VBType if successful, or VBCompileErrorInfo error metadata otherwise.