tinkerbell icon indicating copy to clipboard operation
tinkerbell copied to clipboard

@:forward generate with default args

Open MondayPM opened this issue 11 years ago • 1 comments

It would appear that default args on the function that is being forwarded to are not declared in the generated wrapper function, resulting in the default arguments not being executed with, in the forwarded-to function. It would appear for Ints, 0 is sent instead of the default argument.

MondayPM avatar Oct 24 '14 11:10 MondayPM

I don't think there's much I can do about it. All I can really find out about the parameter is whether it is optional or not: http://api.haxe.org/haxe/macro/Type.html#TFun

However, if you set the type to Null<Int>, it should work (at the performance cost caused by Null<Int> that is). Or you will have to forward those particular functions by hand (and forwarding will then skip them).

back2dos avatar Oct 30 '14 12:10 back2dos