Open R32 opened 2 months ago
Haxe often generates calls like multiply(1, null)
, so this will be impossible to do and will break the specification with null
vars, because JS doesn't update null
values in args
I did some testing and found that it seems like Haxe only generates multiply(1, null)
for external functions.
And also for external functions, null
doesn't seem to be necessary in multiply(1, null)
. I know that null
isn't undefined
, but there should be some way to handle it.
final x = null; foo(x);
also generate let x = null
, and not undefined
, so there is a lot of things to change to undefined
generation, and it can break other things then
In this case, we will have to change all null
generation to undefined
for js target. This could be more logical, but more significant reasons are needed than just this one case of pretty code, because this is still a breaking change for js.Lib.undefined
checks
haxe source :
Current output :
Expected output : es6 default parameters