expressions now support dict data-type
This commit is contained in:
@@ -144,6 +144,15 @@ func (self *term) compute(ctx ExprContext) (v any, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
func (self *term) toInt(computedValue any, valueDescription string) (i int, err error) {
|
||||
if index64, ok := computedValue.(int64); ok {
|
||||
i = int(index64)
|
||||
} else {
|
||||
err = self.Errorf("%s, got %T", valueDescription, computedValue)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func (self *term) errIncompatibleTypes(leftValue, rightValue any) error {
|
||||
return self.tk.Errorf(
|
||||
"left operand '%v' [%T] and right operand '%v' [%T] are not compatible with operator %q",
|
||||
|
||||
Reference in New Issue
Block a user