The generated function arguments m, n, o can conflict with the actual JS values (particularly n which is not uncommon as a variable name), causing weird errors.
Given a module:
module Example {
fun show(something : a, list: b, value: c) {
`
(() => {
for (let n = 0; n < #{list}.length; n++) {
console.log(#{list}[n])
}
})()
`
}
}
This generates:
const AH = new(class extends _M {
b(n, m, o) {
return ((() => {
for (let n = 0; n < m.length; n++) {
console.log(m[n])
}
})());
}
});
The n defined in the JavaScript code is shadowing the n defined as the minified argument name.
It seems like these generated arguments should be ones that cannot conflict, perhaps with an index/uuid like n9208, or __0__, __1__, etc..
The generated function arguments
m,n,ocan conflict with the actual JS values (particularlynwhich is not uncommon as a variable name), causing weird errors.Given a module:
This generates:
The
ndefined in the JavaScript code is shadowing thendefined as the minified argument name.It seems like these generated arguments should be ones that cannot conflict, perhaps with an index/uuid like
n9208, or__0__,__1__, etc..