Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
petar-dambovaliev committed Jan 20, 2025
1 parent eeeae46 commit 862a198
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gnovm/pkg/gnolang/preprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -1652,7 +1652,7 @@ func preprocess1(store Store, ctx BlockNode, n Node) Node {
case StringKind, ArrayKind, SliceKind:
// Replace const index with int *ConstExpr,
// or if not const, assert integer type..
checkOrConvertIntegerKind(store, last, n.Index)
checkOrConvertIntegerKind(store, last, n, n.Index)

// Addressability of this index expression can only be known for slice and
// strings, explanations below in the respective blocks. If this is an index
Expand All @@ -1668,7 +1668,7 @@ func preprocess1(store Store, ctx BlockNode, n Node) Node {
}
case MapKind:
mt := baseOf(gnoTypeOf(store, dt)).(*MapType)
checkOrConvertType(store, last, &n.Index, mt.Key, false)
checkOrConvertType(store, last, n, &n.Index, mt.Key, false)
n.Addressability = addressabilityStatusUnsatisfied
default:
panic(fmt.Sprintf(
Expand Down

0 comments on commit 862a198

Please sign in to comment.