Fixed: #2279 AS3 Decompilation - assignments on the right side of && and || operators

This commit is contained in:
Jindra Petřík
2024-08-17 17:15:23 +02:00
parent e5e870f8b9
commit 2912d3d0de
11 changed files with 88 additions and 5 deletions

View File

@@ -99,6 +99,7 @@ package
TestNumberCall;
TestOperations;
TestOptimization;
TestOptimizationAndOr;
TestOptionalParameters;
TestParamNames;
TestParamsCount;

View File

@@ -9,7 +9,7 @@ package tests
{
var c:InnerClass = new InnerClass();
c.attr = 2;
var a = attr;
var a:int = attr;
trace(a);
}
}

View File

@@ -0,0 +1,19 @@
package tests
{
public class TestOptimizationAndOr
{
public function run():*
{
var o:Object = {a:"Object", b:"Object", c:"Object"};
var a:String = "d";
var plugin:Object;
if (a in o && (plugin = new o[a]).toString().length > 2) {
trace("okay");
}
}
}
}

View File

@@ -3,7 +3,7 @@ package tests
public class TestStringCoerce
{
var a:Object = null;
private var a:Object = null;
public function run():*
{