operator-dot.go: replaced []any with *ListType
This commit is contained in:
parent
434ddee733
commit
f55a48aa26
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user