Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
ltzmaxwell committed Oct 18, 2024
1 parent d96704a commit 607e163
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gnovm/pkg/gnolang/preprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -2924,10 +2924,10 @@ func findLoopUses2(ctx BlockNode, bn BlockNode) {
case NameExprTypeHeapDefine:
// Find the block where name is defined
dbn := last.GetBlockNodeForPath(nil, n.Path)
// if the name is loop defined,
// if the name is loop defined
lds, _ := dbn.GetAttribute(ATTR_LOOP_DEFINES).([]Name)
if slices.Contains(lds, n.Name) {
// if the name is actually loop used,
// if the name is actually loop used
lus, _ := dbn.GetAttribute(ATTR_LOOP_USES).([]Name)
if !slices.Contains(lus, n.Name) {
// demote type finally to Define.
Expand Down Expand Up @@ -4707,7 +4707,7 @@ func setNodeLines(n Node) {
}
line := n.GetLine()
if line == lastLine {
} else if line == 0 { // XXX, should not happen?
} else if line == 0 {
line = lastLine
} else {
lastLine = line
Expand Down

0 comments on commit 607e163

Please sign in to comment.