Closed Ced-Sharp closed 2 years ago
As per documentation, #args
is superseded by 2.3's named arguments,
function test(a, b = 2, c) {
}
function test2(d, e = 2, f) {
}
is there a reason why you are trying to use it over the built-in feature?
You are completely right, I missed that part from the doc, guess I went too quickly.
The issue is still there for the #args
operator, but as I don't need to use it at all, I guess it's not an important matter.
I'll leave it up to you to decide if you want to close this, or keep it open to eventually fix it.
I'm using GMEdit Beta v11.3.0.0 (version Dec 8, 2021) on Windows 11. I'm using GameMaker Studio 2 with IDE v2.3.7.606 and runtime v2.3.7.476.
I did not extensively test this, but here is a simple reproduction. If a file contains a single function, the
#args
magic works as expected. But if the file contains multiple function, sometimes the first function's#args
is collapsed, sometimes not. All other functions in the file are never collapsed.Example where
#args
work as expected:Example where
#args
does not get collapsed:Re-opening that 2nd example shows this:
It does not break the game from running, but I believe this is not the correct behavior for the
#args
magic.