Fixed #1762 AS call on integer numbers parenthesis

This commit is contained in:
Jindra Petřík
2021-12-01 08:44:30 +01:00
parent 2011684b7f
commit 1928962d6f
17 changed files with 65 additions and 8 deletions

View File

@@ -2385,4 +2385,12 @@ public class ActionScript2Test extends ActionScript2TestBase {
+ "trace(\"after\");\r\n"
);
}
@Test
public void frame85_numbersCallTest() {
compareSrc(85, "trace(\"numbersCallTest\");\r\n"
+ "var a = (5).toString();\r\n"
+ "var b = 5.2.toString();\r\n"
);
}
}

View File

@@ -1214,6 +1214,13 @@ public class ActionScript3ClassicAirDecompileTest extends ActionScript3Decompile
false);
}
@Test
public void testNumberCall() {
decompileMethod("classic_air", "testNumberCall", "var a:String = (5).toString();\r\n"
+ "var b:String = 5.2.toString();\r\n",
false);
}
@Test
public void testParamNames() {
decompileMethod("classic_air", "testParamNames", "return firstp + secondp + thirdp;\r\n",

View File

@@ -1204,6 +1204,13 @@ public class ActionScript3ClassicDecompileTest extends ActionScript3DecompileTes
false);
}
@Test
public void testNumberCall() {
decompileMethod("classic", "testNumberCall", "var a:String = (5).toString();\r\n"
+ "var b:String = 5.2.toString();\r\n",
false);
}
@Test
public void testParamNames() {
decompileMethod("classic", "testParamNames", "return firstp + secondp + thirdp;\r\n",