Skip to content

Commit

Permalink
Update gnovm/pkg/gnolang/preprocess.go
Browse files Browse the repository at this point in the history
Co-authored-by: Lee ByeongJun <[email protected]>
  • Loading branch information
omarsy and notJoon authored Jan 24, 2025
1 parent d4723a0 commit 9351618
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 @@ -3378,10 +3378,10 @@ func evalConst(store Store, last BlockNode, x Expr) *ConstExpr {
t := evalStaticTypeOf(store, last, clx.Args[0])
if ar, ok := unwrapPointerType(baseOf(t)).(*ArrayType); ok {
fv := clx.Func.(*ConstExpr).V.(*FuncValue)
switch {
case fv.Name == "cap":
switch fv.Name {
case "cap":
fallthrough
case fv.Name == "len":
case "len":
tv := TypedValue{T: IntType}
tv.SetInt(ar.Len)
cx = &ConstExpr{
Expand Down

0 comments on commit 9351618

Please sign in to comment.