5.5.2.2 Runtime semantics
Note
This section describes the implementation of MS-VBAL §5.5.2.2 Runtime semantics.
Set-coercion is evaluated by SetCoercionRuntimeSemantics, through
ISetCoercionRuntimeSemantics.
| Construct | Set-coercion entry point | See |
|---|---|---|
Set statement |
The same direct entry point that WithStatementRuntimeSemantics uses for its own With-target coercion, not the operator pipeline. |
RD-VBAL §5.4.3.9 Set Statement |
Class-valued With target |
Set-assigned through ISetCoercionRuntimeSemantics. |
RD-VBAL §5.4.2.21 With Statement |
Set-coercion does not dispatch to per-destination-type strategies, so it does not need the operator pipeline. Let-coercion, by contrast, dispatches to a per-destination-type strategy; see RD-VBAL §5.5.1.2 Runtime semantics.
5.5.2.2.1 Set-coercion to and from a class or Object or Nothing
Note
This section describes the implementation of MS-VBAL §5.5.2.2.1 Set-coercion to and from a class or Object or Nothing.
SetCoercionRuntimeSemantics unwraps a Variant that wraps an object before its
VBObjectValue pattern-match. The unwrap is recursive,
because a Variant may wrap another Variant.
👉 A VBVariantValue's
TypeInfomirrors its wrapped value's, but the instance remains aVBVariantValue: without the unwrap, the pattern-match would see the box instead of the object (RD-VBAL §5.5.1.2.12 Let-coercion to Variant).
5.5.2.2.2 Set-coercion to and from non-object types
This section corresponds to MS-VBAL §5.5.2.2.2 Set-coercion to and from non-object types.
Note
Reserved. This section has no content yet.
⏮️ RD-VBAL §5.5.2.1 Static semantics | ⏭️ RD-VBAL §5.6 Expressions