Add makeVarArgs to ReflectUtil.hx
This commit is contained in:
@@ -416,4 +416,13 @@ class ReflectUtil
|
||||
if (cls == null) return "Unknown";
|
||||
return Type.getClassName(cls);
|
||||
}
|
||||
|
||||
/**
|
||||
* Transform a function taking an array of arguments into a function that can
|
||||
* be called with any number of arguments.
|
||||
*/
|
||||
public static function makeVarArgs(f:Array<Dynamic>->Dynamic):Dynamic
|
||||
{
|
||||
return Reflect.makeVarArgs(f);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user