A var binding in a function with a parameter of same name creates a new binding, but that binding inherits the initial value of the param. e.g. (x => { var x; return x; })(123) evaluates to 123.
Livepack handles this case correctly - if the var names are mangled, they'll both be renamed the same so the inheritance between the param x and var x is maintained.
However, it does not do the same for arguments, as the implicit arguments created by the function is not renamed, and the var binding is.
Input:
Current output:
A
var
binding in a function with a parameter of same name creates a new binding, but that binding inherits the initial value of the param. e.g.(x => { var x; return x; })(123)
evaluates to123
.Livepack handles this case correctly - if the var names are mangled, they'll both be renamed the same so the inheritance between the param
x
andvar x
is maintained.However, it does not do the same for
arguments
, as the implicitarguments
created by the function is not renamed, and thevar
binding is.