Table of Contents

Class NewExpressionStaticSemantics

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

MS-VBAL 5.6.8 New Expressions (static semantics). A New expression is invalid if the type referenced by its TypeExpression is not instantiable.

public sealed record NewExpressionStaticSemantics : IStaticSemantics, IEquatable<NewExpressionStaticSemantics>
Inheritance
NewExpressionStaticSemantics
Implements
Inherited Members

Properties

Instance

public static NewExpressionStaticSemantics Instance { get; }

Property Value

NewExpressionStaticSemantics

Methods

DetermineDeclaredType(StaticEvaluationContext, ExpressionNode, params VBType[])

Determines the declared type of a NewExpressionNode — the type referenced by its TypeExpression, if that reference is an instantiable class module.

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

Parameters

context StaticEvaluationContext

The compile-time context this expression is evaluated against.

expression ExpressionNode

The NewExpressionNode being evaluated.

operandDeclaredTypes VBType[]

Unused — TypeExpression names a type, not a value.

Returns

StaticSemanticsEvaluationResult

Exceptions

ArgumentException

expression is not a NewExpressionNode.