From 2d3f37c26c7d755fb5ec4d2e0e53ae3f9458e8bb Mon Sep 17 00:00:00 2001 From: Petar Dambovaliev Date: Thu, 16 Jan 2025 18:28:44 +0100 Subject: [PATCH] save --- gnovm/pkg/gnolang/preprocess.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gnovm/pkg/gnolang/preprocess.go b/gnovm/pkg/gnolang/preprocess.go index d337706c7ed..96e09642cd8 100644 --- a/gnovm/pkg/gnolang/preprocess.go +++ b/gnovm/pkg/gnolang/preprocess.go @@ -4575,8 +4575,12 @@ func predefineNow2(store Store, last BlockNode, d Decl, stack *[]Name) (Decl, bo if !file.IsInitialized() { panic("all types from files in file-set should have already been predefined") } + + declaration := *decl + declaration.SetAttribute(ATTR_GLOBAL, true) + // predefine dependency (recursive). - *decl, _ = predefineNow2(store, file, *decl, stack) + *decl, _ = predefineNow2(store, file, declaration, stack) } else { break }