Fix incorrect tests for `CreateDynamicFunction`
PR https://github.com/tc39/ecma262/pull/3222 changed the evaluation order for ToString(bodyArg) and ToString(arg), making it so that the body is converted to a string before the args, which differs from the previous behaviour.
For reference:
CreateDynamicFunction (ES draft)
...
7. Let bodyString be ? ToString(bodyArg).
8. Let parameterStrings be a new empty List.
9. For each element arg of parameterArgs, do
a. Append ? ToString(arg) to parameterStrings.
...
CreateDynamicFunction (ES 2023)
...
10. If argCount > 0, then
a. Let firstArg be parameterArgs[0].
b. Set P to ? ToString(firstArg).
...
d. Repeat, while k < argCount,
i. Let nextArg be parameterArgs[k].
ii. Let nextArgString be ? ToString(nextArg).
...
11. Let bodyString be the string-concatenation of 0x000A (LINE FEED), ? ToString(bodyArg), and 0x000A (LINE FEED).
...
Hold on, that ordering change might have not been intentional. @ptomato Do you remember if we talked about it?
Hold on, that ordering change might have not been intentional. @ptomato Do you remember if we talked about it?
There were so many revisions requested, I'm actually not sure anymore. Looking through the history, it looks like I made that change in response to https://github.com/tc39/ecma262/pull/3222#discussion_r1445101746, but I can't remember if there was a conversation outside of GitHub.
Closing in favour of tc39/ecma262/pull/3288