@@ -289,6 +289,8 @@ var Builtins = []*Function{
289289 }
290290 for _ , arg := range args {
291291 switch kind (arg ) {
292+ case reflect .Interface :
293+ return anyType , nil
292294 case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 , reflect .Uint , reflect .Uint8 , reflect .Uint16 , reflect .Uint32 , reflect .Uint64 , reflect .Float32 , reflect .Float64 :
293295 default :
294296 return anyType , fmt .Errorf ("invalid argument for max (type %s)" , arg )
@@ -306,6 +308,8 @@ var Builtins = []*Function{
306308 }
307309 for _ , arg := range args {
308310 switch kind (arg ) {
311+ case reflect .Interface :
312+ return anyType , nil
309313 case reflect .Int , reflect .Int8 , reflect .Int16 , reflect .Int32 , reflect .Int64 , reflect .Uint , reflect .Uint8 , reflect .Uint16 , reflect .Uint32 , reflect .Uint64 , reflect .Float32 , reflect .Float64 :
310314 default :
311315 return anyType , fmt .Errorf ("invalid argument for min (type %s)" , arg )
@@ -493,6 +497,8 @@ var Builtins = []*Function{
493497 return anyType , fmt .Errorf ("invalid number of arguments (expected 1, got %d)" , len (args ))
494498 }
495499 switch kind (args [0 ]) {
500+ case reflect .Interface :
501+ return arrayType , nil
496502 case reflect .Map :
497503 return arrayType , nil
498504 }
@@ -521,6 +527,8 @@ var Builtins = []*Function{
521527 return anyType , fmt .Errorf ("invalid number of arguments (expected 1, got %d)" , len (args ))
522528 }
523529 switch kind (args [0 ]) {
530+ case reflect .Interface :
531+ return arrayType , nil
524532 case reflect .Map :
525533 return arrayType , nil
526534 }
0 commit comments