Fixed: AS3 with statement decompilation

This commit is contained in:
Jindra Petřík
2021-02-20 22:01:46 +01:00
parent b9749678f9
commit 8a6c4cf35c
14 changed files with 160 additions and 14 deletions

View File

@@ -28,6 +28,8 @@ package
TestTryCatchLoopBreak6;
TestTryCatchReturn;
TestTryCatchExceptionUsage
TestTryCatchTry;
TestTryCatchWith;
TestTryFinally;
TestTryFinallyDirectReturnInFinally;
TestTryFinallyLoop;
@@ -38,8 +40,7 @@ package
TestTryFinallyReturnInFinally;
TestTryFinallyReturnNested;
TestTryFinallyReturnNested2;
TestTryFinallyReturnVoid;
TestTryCatchTry;
TestTryFinallyReturnVoid;
public function Main()
{

View File

@@ -0,0 +1,39 @@
package tests
{
/**
* ...
* @author JPEXS
*/
public class TestTryCatchWith
{
public function run() : void
{
var a:MyTest = new MyTest();
trace("before with");
with (a)
{
trace("before try");
try
{
trace("in try");
}
catch (e:Error)
{
attrib = attrib + 1;
trace("in catch");
}
trace("after try");
}
trace("after");
}
}
}
class MyTest
{
public var attrib:int = 5;
}