The following breaks using tstl v1.6.0:
const array = [1, 2, 3]
array.filter(x => x>1)
The output lua is this:
array = {1, 2, 3}
__TS__ArrayFilter(
array,
function(x) return x > 1 end
)
The function is missing a filler parameter for the self parameter. When it runs, it crashes trying to compare x (due to the missing filler, is the self parameter, nil) to 1.
The following breaks using tstl v1.6.0:
The output lua is this:
The function is missing a filler parameter for the self parameter. When it runs, it crashes trying to compare x (due to the missing filler, is the self parameter,
nil) to 1.