func (w *World) compileIndexExpr(n *ast.IndexExpr) Expr { x := w.compileExpr(n.X) kind := x.Type().Kind() if !(kind == reflect.Array || kind == reflect.Slice) { panic(err(n.Pos(), "can not index", x.Type())) } i := typeConv(n.Index.Pos(), w.compileExpr(n.Index), int_t) return &index{x, i} }