mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-24 18:14:36 +00:00
Fixed: #2618 AS1/2 increment/decrement using PushDuplicate
This commit is contained in:
@@ -572,4 +572,19 @@ public class ActionScript2AssemblerTest extends ActionScript2TestBase {
|
||||
+ "}\n"
|
||||
+ "}");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testIncrementDup() {
|
||||
String res = decompilePcode("Push \"this\"\n"
|
||||
+ "GetVariable\n"
|
||||
+ "PushDuplicate\n"
|
||||
+ "Push \"myVar\"\n"
|
||||
+ "GetMember\n"
|
||||
+ "Increment\n"
|
||||
+ "Push \"myVar\"\n"
|
||||
+ "StackSwap\n"
|
||||
+ "SetMember");
|
||||
res = cleanPCode(res);
|
||||
assertEquals(res, "this.myVar++;");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user