Fixed: AS3 direct editation - unary minus (negate) compiled as 0 - value

This commit is contained in:
Jindra Petřík
2021-02-16 18:46:22 +01:00
parent b03cad4f90
commit e414e1919d
9 changed files with 47 additions and 4 deletions

View File

@@ -16,7 +16,7 @@
</define>
<define append="true">
<name>CONFIG::timeStamp</name>
<value>'11.02.2021'</value>
<value>'16.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>'11.02.2021'</value>
<value>'16.02.2021'</value>
</define>
<define append="true">
<name>CONFIG::air</name>

View File

@@ -7,6 +7,7 @@ package
import tests_classes.mypackage2.SetupMyPackage2;
import tests_classes.mypackage3.SetupMyPackage3;
import tests_classes.*;
import tests_edit.*;
/**
* ...
@@ -104,6 +105,9 @@ package
TestInitializer;
TestRegexpHilight;
TestPropertyCoerce;
TestUnaryMinus;
public function Main()
{
if (stage) init();

View File

@@ -0,0 +1,18 @@
package tests_edit
{
/**
* ...
* @author JPEXS
*/
public class TestPropertyCoerce
{
private var attr:Number = 5;
public function run():void
{
this.attr = 10;
}
}
}

View File

@@ -0,0 +1,19 @@
package tests_edit
{
/**
* ...
* @author JPEXS
*/
public class TestUnaryMinus
{
public function run(): void
{
var a:int = 5;
var b:int = 6;
var c:int = -a * b;
}
}
}