mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-02 14:14:21 +00:00
Fixed: AS3 decompilation: increment/decrement on properties
This commit is contained in:
@@ -127,7 +127,7 @@ public class ActionScript3AssembledDecompileTest extends ActionScript3DecompileT
|
||||
|
||||
@Test
|
||||
public void testIncrement3() {
|
||||
decompileMethod("assembled", "testIncrement3", "--_loc1_.length;\r\n",
|
||||
decompileMethod("assembled", "testIncrement3", "_loc1_.length--;\r\n",
|
||||
false);
|
||||
}
|
||||
|
||||
|
||||
@@ -294,9 +294,9 @@ public class ActionScript3ClassicAirDecompileTest extends ActionScript3Decompile
|
||||
public void testDotParent() {
|
||||
decompileMethod("classic_air", "testDotParent", "var d:* = new TestClass1();\r\n"
|
||||
+ "var k:* = null;\r\n"
|
||||
+ "k.(++d.attrib, false);\r\n"
|
||||
+ "k.(d.attrib++, false);\r\n"
|
||||
+ "trace(\"between\");\r\n"
|
||||
+ "var g:* = k.(++d.attrib, false);\r\n"
|
||||
+ "var g:* = k.(d.attrib++, false);\r\n"
|
||||
+ "trace(\"end\");\r\n",
|
||||
false);
|
||||
}
|
||||
@@ -855,7 +855,19 @@ public class ActionScript3ClassicAirDecompileTest extends ActionScript3Decompile
|
||||
+ "var index:uint = 0;\r\n"
|
||||
+ "chars[index++] = 5;\r\n"
|
||||
+ "trace(\"arr[++e]\");\r\n"
|
||||
+ "chars[++index] = 5;\r\n",
|
||||
+ "chars[++index] = 5;\r\n"
|
||||
+ "trace(\"attr++\");\r\n"
|
||||
+ "trace(attrx++);\r\n"
|
||||
+ "attrx++;\r\n"
|
||||
+ "trace(\"attr--\");\r\n"
|
||||
+ "trace(attrx--);\r\n"
|
||||
+ "attrx--;\r\n"
|
||||
+ "trace(\"++attr\");\r\n"
|
||||
+ "trace(++attrx);\r\n"
|
||||
+ "++attrx;\r\n"
|
||||
+ "trace(\"--attr\");\r\n"
|
||||
+ "trace(--attrx);\r\n"
|
||||
+ "--attrx;\r\n",
|
||||
false);
|
||||
}
|
||||
|
||||
|
||||
@@ -848,7 +848,19 @@ public class ActionScript3ClassicDecompileTest extends ActionScript3DecompileTes
|
||||
+ "chars[_loc7_] = 5;\r\n"
|
||||
+ "trace(\"arr[++e]\");\r\n"
|
||||
+ "var _loc8_:* = ++index;\r\n"
|
||||
+ "chars[_loc8_] = 5;\r\n",
|
||||
+ "chars[_loc8_] = 5;\r\n"
|
||||
+ "trace(\"attr++\");\r\n"
|
||||
+ "trace(this.attrx++);\r\n"
|
||||
+ "++this.attrx;\r\n"
|
||||
+ "trace(\"attr--\");\r\n"
|
||||
+ "trace(this.attrx--);\r\n"
|
||||
+ "--this.attrx;\r\n"
|
||||
+ "trace(\"++attr\");\r\n"
|
||||
+ "trace(++this.attrx);\r\n"
|
||||
+ "++this.attrx;\r\n"
|
||||
+ "trace(\"--attr\");\r\n"
|
||||
+ "trace(--this.attrx);\r\n"
|
||||
+ "--this.attrx;\r\n",
|
||||
false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user