diff --git a/operator-length.go b/operator-length.go index 2467407..e699c64 100644 --- a/operator-length.go +++ b/operator-length.go @@ -25,12 +25,12 @@ func evalLength(ctx ExprContext, self *term) (v any, err error) { if isList(rightValue) { list, _ := rightValue.([]any) - v = len(list) + v = int64(len(list)) } else if isString(rightValue) { s, _ := rightValue.(string) - v = len(s) + v = int64(len(s)) } else if it, ok := rightValue.(Iterator); ok { - v = it.Index() + v = int64(it.Index()) } else { err = self.errIncompatibleType(rightValue) }