Fixed #1936 AS3 - Parentheses around function definition call

This commit is contained in:
Jindra Petřík
2023-01-13 23:34:43 +01:00
parent 376888af0d
commit c5d1790c25
10 changed files with 80 additions and 6 deletions

View File

@@ -206,7 +206,7 @@ public class CallAVM2Item extends AVM2Item {
if (receiver instanceof ThisAVM2Item) {
recPart = "";
}*/
if (function.getPrecedence() > precedence) {
if (function.getPrecedence() > precedence || (function instanceof NewFunctionAVM2Item)) {
writer.append("(");
function.toString(writer, localData);
writer.append(")");