From f55a48aa2679c17738c8feb4e9a798246504cc18 Mon Sep 17 00:00:00 2001 From: Celestino Amoroso Date: Mon, 6 May 2024 04:15:46 +0200 Subject: [PATCH] operator-dot.go: replaced []any with *ListType --- operator-dot.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/operator-dot.go b/operator-dot.go index f75837e..f094513 100644 --- a/operator-dot.go +++ b/operator-dot.go @@ -47,10 +47,11 @@ func evalDot(ctx ExprContext, self *term) (v any, err error) { indexTerm := self.children[1] switch unboxedValue := leftValue.(type) { - case []any: + case *ListType: var index int - if index, err = verifyIndex(ctx, indexTerm, len(unboxedValue)); err == nil { - v = unboxedValue[index] + array := ([]any)(*unboxedValue) + if index, err = verifyIndex(ctx, indexTerm, len(array)); err == nil { + v = array[index] } case string: var index int