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) {
|
||||
list, _ := childValue.([]any)
|
||||
v = int64(len(list))
|
||||
ls, _ := childValue.(*ListType)
|
||||
v = int64(len(*ls))
|
||||
} else if IsString(childValue) {
|
||||
s, _ := childValue.(string)
|
||||
v = int64(len(s))
|
||||
|
Loading…
Reference in New Issue
Block a user