mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-07-07 15:42:49 +00:00
Fix chained assignments, also reorganized TestIncDec tests
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -24,7 +24,10 @@ package
|
||||
TestCallLocal;
|
||||
TestCatchFinally;
|
||||
TestChain2;
|
||||
TestChainedAssignments;
|
||||
TestChainedAssignments1;
|
||||
TestChainedAssignments2;
|
||||
TestChainedAssignments3;
|
||||
TestChainedAssignments4;
|
||||
TestCollidingTraitNames;
|
||||
TestCollidingTry;
|
||||
TestComplexExpressions;
|
||||
|
||||
15
libsrc/ffdec_lib/testdata/as3_new/src/tests/TestChainedAssignments1.as
vendored
Normal file
15
libsrc/ffdec_lib/testdata/as3_new/src/tests/TestChainedAssignments1.as
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
package tests
|
||||
{
|
||||
|
||||
public class TestChainedAssignments1
|
||||
{
|
||||
public function run():*
|
||||
{
|
||||
trace("c = b = a = 5;");
|
||||
var a:int = 0;
|
||||
var b:int = 0;
|
||||
var c:int = 0;
|
||||
c = b = a = 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
libsrc/ffdec_lib/testdata/as3_new/src/tests/TestChainedAssignments2.as
vendored
Normal file
19
libsrc/ffdec_lib/testdata/as3_new/src/tests/TestChainedAssignments2.as
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
package tests
|
||||
{
|
||||
|
||||
public class TestChainedAssignments2
|
||||
{
|
||||
public function run():*
|
||||
{
|
||||
trace("e.attrib1 = e.attrib2 = e.attrib3 = 10;");
|
||||
var e:TestClass = new TestClass();
|
||||
e.attrib1 = e.attrib2 = e.attrib3 = 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class TestClass {
|
||||
public var attrib1:int;
|
||||
public var attrib2:int;
|
||||
public var attrib3:int;
|
||||
}
|
||||
18
libsrc/ffdec_lib/testdata/as3_new/src/tests/TestChainedAssignments3.as
vendored
Normal file
18
libsrc/ffdec_lib/testdata/as3_new/src/tests/TestChainedAssignments3.as
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
package tests
|
||||
{
|
||||
|
||||
public class TestChainedAssignments3
|
||||
{
|
||||
private var prop:int;
|
||||
|
||||
public function run():*
|
||||
{
|
||||
var a:int = 0;
|
||||
var b:int = 0;
|
||||
prop = a = b = 4;
|
||||
if (a == 2) {
|
||||
trace("OK: " + a);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
18
libsrc/ffdec_lib/testdata/as3_new/src/tests/TestChainedAssignments4.as
vendored
Normal file
18
libsrc/ffdec_lib/testdata/as3_new/src/tests/TestChainedAssignments4.as
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
package tests
|
||||
{
|
||||
|
||||
public class TestChainedAssignments4
|
||||
{
|
||||
private var prop:int;
|
||||
|
||||
public function run():*
|
||||
{
|
||||
trace("slotc = slotb = slota = 5;");
|
||||
var slota:int = 0;
|
||||
var slotb:int = 0;
|
||||
var slotc:int = 0;
|
||||
var f:Function = function(n1:int, n2:int):int {return n1 + n2;}; //trigger slot generating
|
||||
slotc = slotb = slota = 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user