Support for comma operator in switch case statements

This commit is contained in:
Jindra Petřík
2021-01-23 14:16:11 +01:00
parent 3f2e075ee9
commit 0a60be9246
6 changed files with 116 additions and 20 deletions

View File

@@ -69,8 +69,9 @@ package
TestRest;
TestStrictEquals;
TestStringConcat;
TestStrings;
TestStrings;
TestSwitch;
TestSwitchComma;
TestSwitchDefault;
TestTernarOperator;
TestTry;

View File

@@ -0,0 +1,27 @@
package tests
{
public class TestSwitchComma
{
private static const X:int = 7;
public function run():*
{
var b:int = 5;
var a:String = "A";
switch (a)
{
case "A":
trace("is A");
break;
case "B":
trace("is B");
case TestSwitchComma.X,"C":
trace("is C");
break;
}
}
}
}