Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
petar-dambovaliev committed Jan 16, 2025
1 parent 9152ea8 commit 4913c76
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gnovm/pkg/gnolang/preprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ func PredefineFileSet(store Store, pn *PackageNode, fset *FileSet) {
continue
}

d.SetAttribute(ATTR_GLOBAL, true)
// recursively predefine dependencies.
d2, _ := predefineNow(store, fn, d)

Expand Down Expand Up @@ -4442,6 +4443,7 @@ func findUndefined2(store Store, last BlockNode, x Expr, t Type, skipPredefined
return
}
case *CallExpr:
cx.Func.SetAttribute(ATTR_GLOBAL, cx.GetAttribute(ATTR_GLOBAL))
un = findUndefined2(store, last, cx.Func, nil, skipPredefined)
if un != "" {
return
Expand Down Expand Up @@ -4732,6 +4734,7 @@ func tryPredefine(store Store, last BlockNode, d Decl) (un Name) {
return
}
for _, vx := range d.Values {
vx.SetAttribute(ATTR_GLOBAL, d.GetAttribute(ATTR_GLOBAL))
un = findUndefined(store, last, vx)
if un != "" {
return
Expand Down

0 comments on commit 4913c76

Please sign in to comment.