operator-length.go: fixed length of list
This commit is contained in:
parent
4aa0113c6a
commit
8c66d90532
@ -24,8 +24,8 @@ func evalLength(ctx ExprContext, self *term) (v any, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if IsList(childValue) {
|
if IsList(childValue) {
|
||||||
list, _ := childValue.([]any)
|
ls, _ := childValue.(*ListType)
|
||||||
v = int64(len(list))
|
v = int64(len(*ls))
|
||||||
} else if IsString(childValue) {
|
} else if IsString(childValue) {
|
||||||
s, _ := childValue.(string)
|
s, _ := childValue.(string)
|
||||||
v = int64(len(s))
|
v = int64(len(s))
|
||||||
|
Loading…
Reference in New Issue
Block a user