metatableRef property

Value? get metatableRef

Reference to the original metatable Value when set via setmetatable.

This allows getmetatable to return the same table object that was provided, preserving identity semantics required by Lua tests.

Implementation

Value? get metatableRef => _metadataPayload?.metatableRef;
set metatableRef (Value? value)

Implementation

set metatableRef(Value? value) {
  if (value == null && _metadataPayload == null) return;
  _metadataPayloadForWrite().metatableRef = value;
}