Fixed: #2391 Double not operator in ternar operator expression

This commit is contained in:
Jindra Petřík
2025-03-22 21:35:12 +01:00
parent a685050dff
commit a992adb5c0
9 changed files with 38 additions and 3 deletions
Binary file not shown.
Binary file not shown.
+1
View File
@@ -122,6 +122,7 @@ package
TestSwitchDefault;
TestSwitchIf;
TestTernarOperator;
TestTernarOperator2;
TestTry;
TestTryIf;
TestTryReturn;
@@ -24,7 +24,7 @@ package tests
this.ti = ti && (ti = new TestClass());
var a = ti && (ti = new TestClass());
var a:* = ti && (ti = new TestClass());
var b:int = 1 + (i || j); //no coercion
@@ -33,7 +33,7 @@ package tests
return ti && (ti = new TestClass());
}
public function test(p:TestInterface)
public function test(p:TestInterface): void
{
}
@@ -0,0 +1,14 @@
package tests
{
public class TestTernarOperator2
{
public function run():*
{
var b:Boolean = true;
var i:int = 1;
var j:int = b ? i : i + 1;
var k:int = i ? j : j + 1;
}
}
}