Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
petar-dambovaliev committed May 15, 2024
1 parent 8b3833d commit 314169b
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions gnovm/pkg/gnolang/preprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -2727,19 +2727,17 @@ func findUndefined(store Store, last BlockNode, x Expr) (un Name) {

// finds the next undefined identifier and returns it if it is global
func findUndefined2SkipLocals(store Store, last BlockNode, x Expr, t Type) Name {
pkg := packageOf(last)
name := findUndefined2(store, last, x, t)

Check warning on line 2730 in gnovm/pkg/gnolang/preprocess.go

View check run for this annotation

Codecov / codecov/patch

gnovm/pkg/gnolang/preprocess.go#L2729-L2730

Added lines #L2729 - L2730 were not covered by tests

if name == "" {
return ""
}

_, _, ok := pkg.FileSet.GetDeclForSafe(name)
if name != "" {
pkg := packageOf(last)

Check warning on line 2733 in gnovm/pkg/gnolang/preprocess.go

View check run for this annotation

Codecov / codecov/patch

gnovm/pkg/gnolang/preprocess.go#L2732-L2733

Added lines #L2732 - L2733 were not covered by tests

// skip it if it's a local identifier
if !ok {
return ""
if _, _, ok := pkg.FileSet.GetDeclForSafe(name); !ok {

Check warning on line 2735 in gnovm/pkg/gnolang/preprocess.go

View check run for this annotation

Codecov / codecov/patch

gnovm/pkg/gnolang/preprocess.go#L2735

Added line #L2735 was not covered by tests
// skip it if it's a local identifier
return ""

Check warning on line 2737 in gnovm/pkg/gnolang/preprocess.go

View check run for this annotation

Codecov / codecov/patch

gnovm/pkg/gnolang/preprocess.go#L2737

Added line #L2737 was not covered by tests
}
}

return name

Check warning on line 2741 in gnovm/pkg/gnolang/preprocess.go

View check run for this annotation

Codecov / codecov/patch

gnovm/pkg/gnolang/preprocess.go#L2741

Added line #L2741 was not covered by tests
}

Expand Down

0 comments on commit 314169b

Please sign in to comment.