Fixed: Dot parent operator not detected in some cases

This commit is contained in:
Jindra Petřík
2021-02-01 19:17:54 +01:00
parent 1a4013ef5f
commit 8878940754
8 changed files with 171 additions and 44 deletions

View File

@@ -232,6 +232,30 @@ public class ActionScript3ClassicDecompileTest extends ActionScript3DecompileTes
false);
}
@Test
public void testDoWhile3() {
decompileMethod("classic", "testDoWhile3", "do\r\n"
+ "{\r\n"
+ "this.nextChar();\r\n"
+ "}\r\n"
+ "while(this.ch != \"\\n\" && this.ch != \"\");\r\n",
false);
}
@Test
public void testDotParent() {
decompileMethod("classic", "testDotParent", "var d:* = undefined;\r\n"
+ "var k:* = undefined;\r\n"
+ "var g:* = undefined;\r\n"
+ "d = new TestClass1();\r\n"
+ "k = null;\r\n"
+ "k.(d.attrib++, 0);\r\n"
+ "trace(\"between\");\r\n"
+ "g = k.(d.attrib++, 0);\r\n"
+ "trace(\"end\");\r\n",
false);
}
@Test
public void testExpressions() {
decompileMethod("classic", "testExpressions", "var arr:Array = null;\r\n"