mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-23 15:44:50 +00:00
Fixed goto/for detection
This commit is contained in:
@@ -41,6 +41,8 @@ package
|
||||
TestGotos3;
|
||||
TestGotos4;
|
||||
TestGotos5;
|
||||
TestGotos6;
|
||||
TestGotos7;
|
||||
TestHello;
|
||||
TestIf;
|
||||
TestIfElse;
|
||||
|
||||
35
libsrc/ffdec_lib/testdata/flashdevelop/src/tests/TestGotos6.as
vendored
Normal file
35
libsrc/ffdec_lib/testdata/flashdevelop/src/tests/TestGotos6.as
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
package tests
|
||||
{
|
||||
|
||||
public class TestGotos6
|
||||
{
|
||||
|
||||
public function run():void
|
||||
{
|
||||
var a:Boolean = true;
|
||||
var s:String = "a";
|
||||
|
||||
if (a)
|
||||
{
|
||||
switch (s)
|
||||
{
|
||||
case "a":
|
||||
trace("is A");
|
||||
break;
|
||||
case "b":
|
||||
trace("is B");
|
||||
case "c":
|
||||
trace("is BC");
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
trace("D");
|
||||
}
|
||||
trace("finish");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
38
libsrc/ffdec_lib/testdata/flashdevelop/src/tests/TestGotos7.as
vendored
Normal file
38
libsrc/ffdec_lib/testdata/flashdevelop/src/tests/TestGotos7.as
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
package tests
|
||||
{
|
||||
|
||||
public class TestGotos7
|
||||
{
|
||||
|
||||
public function run():void
|
||||
{
|
||||
|
||||
for (var i:int = 0; i < 10; i++)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0:
|
||||
trace("zero");
|
||||
continue;
|
||||
case 5:
|
||||
trace("five");
|
||||
break;
|
||||
case 10:
|
||||
trace("ten");
|
||||
break;
|
||||
case 1:
|
||||
if (i == 7)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
trace("one");
|
||||
default:
|
||||
trace("def");
|
||||
}
|
||||
trace("before loop end");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user