@@ -289,6 +289,8 @@ var Builtins = []*Function{
289
289
}
290
290
for _ , arg := range args {
291
291
switch kind (arg ) {
292
+ case reflect .Interface :
293
+ return anyType , nil
292
294
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 :
293
295
default :
294
296
return anyType , fmt .Errorf ("invalid argument for max (type %s)" , arg )
@@ -306,6 +308,8 @@ var Builtins = []*Function{
306
308
}
307
309
for _ , arg := range args {
308
310
switch kind (arg ) {
311
+ case reflect .Interface :
312
+ return anyType , nil
309
313
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 :
310
314
default :
311
315
return anyType , fmt .Errorf ("invalid argument for min (type %s)" , arg )
@@ -493,6 +497,8 @@ var Builtins = []*Function{
493
497
return anyType , fmt .Errorf ("invalid number of arguments (expected 1, got %d)" , len (args ))
494
498
}
495
499
switch kind (args [0 ]) {
500
+ case reflect .Interface :
501
+ return arrayType , nil
496
502
case reflect .Map :
497
503
return arrayType , nil
498
504
}
@@ -521,6 +527,8 @@ var Builtins = []*Function{
521
527
return anyType , fmt .Errorf ("invalid number of arguments (expected 1, got %d)" , len (args ))
522
528
}
523
529
switch kind (args [0 ]) {
530
+ case reflect .Interface :
531
+ return arrayType , nil
524
532
case reflect .Map :
525
533
return arrayType , nil
526
534
}
0 commit comments