Fixed: #1295, #116 AS3 dynamic construction via MultinameL

This commit is contained in:
Jindra Petřík
2025-07-24 23:47:25 +02:00
parent efa21d7ec5
commit ea56b5680f
12 changed files with 226 additions and 9 deletions

View File

@@ -748,4 +748,25 @@ public class ActionScript3ClassTest extends ActionScript3DecompileTestBase {
+ "}\n"
);
}
@Test
public void testConstructDynamically() {
decompileScriptPack("assembled", "tests.TestConstructDynamically", "package tests\n"
+ "{\n"
+ "import flash.display.*;\n"
+ "import flash.utils.getDefinitionByName;\n"
+ "public class TestConstructDynamically\n"
+ "{\n"
+ "public function TestConstructDynamically()\n"
+ "{\n"
+ "super();\n"
+ "}\n"
+ "public function test() : void\n"
+ "{\n"
+ "var _loc1_:* = new (getDefinitionByName(\"flash.display\"+\".\"+\"Sprite\"))();\n"
+ "_loc1_ = new (getDefinitionByName(\"Object\"))();\n"
+ "}\n"
+ "}\n"
+ "}");
}
}