Skip to content

gnolang/pkg/gnovm: obscure runtime panic #3731

Open
@odeke-em

Description

If we run this code https://play.gno.land/p/4gMJ8TWBba5 we get back this obscure error

/src/package.gno:0: unknown Go type *ast.IndexListExpr: (*ast.IndexListExpr)(0x2c1c9c0)({
 X: (*ast.SelectorExpr)(0x2c1a468)({
  X: (*ast.Ident)(0x2c17a80)(n),
  Sel: (*ast.Ident)(0x2c17aa0)(children)
 }),
 Lbrack: (token.Pos) 16786,
 Indices: ([]ast.Expr) (len=2 cap=2) {
  (*ast.Ident)(0x2c17ac0)(targ),
  (*ast.Ident)(0x2c17ae0)(wndex)
 },
 Rbrack: (token.Pos) 16798
})

 (code=2).

but when ran in Go per https://go.dev/play/p/E0q3dB93ISs produces

./prog.go:491:7: undefined: recordFDDDDDDDDound
./prog.go:502:20: undefined: targ
./prog.go:502:26: invalid operation: more than one index
./prog.go:607:23: invalid operation: cannot take address of !n.records[i].Less(start) (value of type bool)

Metadata

Assignees

No one assigned

    Labels

    🐞 bugSomething isn't working

    Type

    No type

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions