Do not parse imports from names with namespace suffix

This commit is contained in:
Jindra Petřík
2025-08-01 19:29:45 +02:00
parent a76ce37d33
commit be5ead4087
9 changed files with 128 additions and 1 deletions

View File

@@ -26,6 +26,8 @@ public class ActionScriptTestBase {
pCode = pCode.replaceAll("\t", " ").trim();
pCode = pCode.replaceAll("( *[\r\n]+ *)+", "\n").trim();
pCode = pCode.replaceAll(" +", " ").trim();
//replace ns suffixes, so testCollidingPublicTraits will work even when ns indices change
pCode = pCode.replaceAll("#[0-9]+", "#_");
return pCode;
}
}

View File

@@ -90,6 +90,13 @@ public class ActionScript3AssembledDecompileTest extends ActionScript3DecompileT
false);
}
@Test
public void testCollidingPublicTraits() {
decompileMethod("assembled", "testCollidingPublicTraits", "trace(\"ns1 = \" + this.a#87);\r\n"
+ "trace(\"ns2 = \" + this.a#88);\r\n",
false);
}
@Test
public void testDeclareReg() {
decompileMethod("assembled", "testDeclareReg", "var other:XML;\r\n"