From 5b2c6ce389c70c4faf3c731aca063a7e16fde0f8 Mon Sep 17 00:00:00 2001 From: Supun Setunga Date: Tue, 24 Aug 2021 16:32:29 -0700 Subject: [PATCH] Resolve TODOs related to static types for deferred values --- runtime/interpreter/value.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/runtime/interpreter/value.go b/runtime/interpreter/value.go index b854dda783..643757492b 100644 --- a/runtime/interpreter/value.go +++ b/runtime/interpreter/value.go @@ -682,9 +682,11 @@ func NewDeferredArrayValue( callback DecodingCallback, version uint16, ) *ArrayValue { + + // Note: static type for deferred arrays gets populated when the meta info is loaded. + // i.e: at `ensureMetaInfoLoaded()` method + return &ArrayValue{ - // TODO: type - Type: nil, valuePath: path, content: content, Owner: owner, @@ -7431,9 +7433,11 @@ func NewDeferredDictionaryValue( decodeCallback DecodingCallback, version uint16, ) *DictionaryValue { + + // Note: static type for deferred dictionaries gets populated when the meta info is loaded. + // i.e: at `ensureMetaInfoLoaded()` method + return &DictionaryValue{ - // TODO: type - Type: DictionaryStaticType{}, Owner: owner, deferredOwner: owner, modified: false,