Table of Contents

Class MemberAccessExpressionStaticSemantics

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

MS-VBAL 5.6 Member Access Expressions (static semantics). The declared type of owner.member is the declared type of the member Member names on Owner's declared type.

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

Properties

Instance

The shared instance — this rule has no state of its own.

public static MemberAccessExpressionStaticSemantics Instance { get; }

Property Value

MemberAccessExpressionStaticSemantics

Methods

DetermineDeclaredType(StaticEvaluationContext, ExpressionNode, params VBType[])

Determines the declared type of a MemberAccessExpressionNode by looking up its Member identifier among the members of its Owner's declared type.

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

Parameters

context StaticEvaluationContext

The compile-time context this expression is evaluated against. Member lookup is structural (an owner type's own members), not lexical; the context's resolver is only used to read those members from the owner class's or user-defined type's declaration, by identity, rather than from the snapshot the type was built with — a class typed after itself cannot carry a complete snapshot.

expression ExpressionNode

The MemberAccessExpressionNode being evaluated.

operandDeclaredTypes VBType[]

The effective owner's already-determined declared type, at MemberAccessOwner — Owner's declared type, or, for a with-expression (Owner is null), the innermost enclosing With block's target type (MS-VBAL §5.6.15), which the caller is responsible for substituting in — this rule doesn't care which it was. Member has no independent declared type to pass here — it is a bare member name, not a lexically resolved expression.

Returns

StaticSemanticsEvaluationResult

Exceptions

ArgumentException

expression is not a MemberAccessExpressionNode.