Fixed: AS3 direct editation - popscope in catch on continue and break

This commit is contained in:
Jindra Petřík
2021-02-20 20:56:14 +01:00
parent 5c95ca24b8
commit a36ca2df20
12 changed files with 116 additions and 2 deletions

View File

@@ -16,7 +16,7 @@
</define>
<define append="true">
<name>CONFIG::timeStamp</name>
<value>'09.02.2021'</value>
<value>'20.02.2021'</value>
</define>
<define append="true">
<name>CONFIG::air</name>

View File

@@ -16,7 +16,7 @@
</define>
<define append="true">
<name>CONFIG::timeStamp</name>
<value>'09.02.2021'</value>
<value>'20.02.2021'</value>
</define>
<define append="true">
<name>CONFIG::air</name>

View File

@@ -25,6 +25,8 @@ package
TestTryCatchLoopBreak3;
TestTryCatchLoopBreak4;
TestTryCatchLoopBreak5;
TestTryCatchLoopBreak6;
TestTryCatchReturn;
TestTryCatchExceptionUsage
TestTryFinally;
TestTryFinallyDirectReturnInFinally;

View File

@@ -0,0 +1,50 @@
package tests
{
import flash.errors.EOFError;
/**
* ...
* @author JPEXS
*/
public class TestTryCatchLoopBreak6
{
public function run() : void
{
var a:int;
a = 0;
trace("before loop");
while (a < 10) {
try
{
trace("in try");
}
catch(e:Error)
{
trace("in catch1");
if (a > 3)
{
break;
}
try
{
trace("in try2");
}
catch(e:Error)
{
trace("in catch2");
if (a > 4)
{
break;
}
}
}
a++;
}
trace("after");
}
}
}

View File

@@ -0,0 +1,33 @@
package tests
{
/**
* ...
* @author JPEXS
*/
public class TestTryCatchReturn
{
public function run() : int
{
var a:int = 5;
trace("before try");
try
{
trace("in try");
}
catch (e:Error)
{
trace("in catch");
if (a == 5)
{
return a;
}
trace("in catch2");
}
trace("after");
return -1;
}
}
}