Issue: Multiple parameters to a generic static function

I have an issue where I have multiple parameters that I pass to a generic static function and the compiler gives me an error:

Unexpected ,

Here’s the sample code: Try Haxe !

I looked over it many times and I cannot find a way to make it work and I have no clue what’s wrong.
I would be glad to hear some opinions and hopefully solutions.

You can’t ask for a specific version of a generic function, see Type Parameters (Type System) - Haxe - The Cross-platform Toolkit.

Also haxe.Constraints.Constructible needs a function signature as type parameter.

A way around that is to construct an object Try Haxe !