mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-08 18:14:07 +00:00
Fixed: #270 AS decompilation - switch in loop
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -43,7 +43,9 @@ package
|
||||
TestForEachReturn;
|
||||
TestForGoto;
|
||||
TestForIn;
|
||||
TestForInIf;
|
||||
TestForInReturn;
|
||||
TestForInSwitch;
|
||||
TestForXml;
|
||||
TestGotos;
|
||||
TestGotos2;
|
||||
@@ -56,6 +58,7 @@ package
|
||||
TestIf;
|
||||
TestIfElse;
|
||||
TestIfInIf;
|
||||
TestIfTry;
|
||||
TestIgnoreAndOr;
|
||||
TestImportedVar;
|
||||
TestInc2;
|
||||
|
||||
24
libsrc/ffdec_lib/testdata/as3_new/src/tests/TestForInIf.as
vendored
Normal file
24
libsrc/ffdec_lib/testdata/as3_new/src/tests/TestForInIf.as
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
package tests
|
||||
{
|
||||
|
||||
public class TestForInIf
|
||||
{
|
||||
public function run():*
|
||||
{
|
||||
var arr:Array = ["a", "b", "c"];
|
||||
var b:int = 5;
|
||||
|
||||
for (var a:String in arr){
|
||||
|
||||
if (b == 5){
|
||||
if (b > 7){
|
||||
trace("b>7");
|
||||
}else{
|
||||
return;
|
||||
}
|
||||
}
|
||||
trace("forend");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
27
libsrc/ffdec_lib/testdata/as3_new/src/tests/TestForInSwitch.as
vendored
Normal file
27
libsrc/ffdec_lib/testdata/as3_new/src/tests/TestForInSwitch.as
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
package tests
|
||||
{
|
||||
|
||||
public class TestForInSwitch
|
||||
{
|
||||
public function run():*
|
||||
{
|
||||
var arr:Array = ["a", "b", "c"];
|
||||
|
||||
for (var a:String in arr){
|
||||
|
||||
switch(a){
|
||||
case "a":
|
||||
trace("val a");
|
||||
break;
|
||||
case "b":
|
||||
trace("val b");
|
||||
break;
|
||||
case "c":
|
||||
trace("val c");
|
||||
//break;
|
||||
}
|
||||
trace("final");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@ package tests
|
||||
{
|
||||
public function run():*
|
||||
{
|
||||
trace("hello");
|
||||
trace("hello");
|
||||
}
|
||||
}
|
||||
}
|
||||
28
libsrc/ffdec_lib/testdata/as3_new/src/tests/TestIfTry.as
vendored
Normal file
28
libsrc/ffdec_lib/testdata/as3_new/src/tests/TestIfTry.as
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
package tests
|
||||
{
|
||||
|
||||
public class TestIfTry
|
||||
{
|
||||
public function run():*
|
||||
{
|
||||
var b:Boolean = true;
|
||||
|
||||
if (b)
|
||||
{
|
||||
var c:int = 5;
|
||||
for (var i:int = 0; i < c; i++)
|
||||
{
|
||||
trace("xx");
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
trace("in try");
|
||||
}
|
||||
catch (e:Error)
|
||||
{
|
||||
trace("in catch");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user