1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-23 18:18:00 +02:00

Fixed payload enum switch case comparison

This commit is contained in:
Brian Fiete 2023-07-24 10:32:31 -07:00
parent 52f746aae9
commit 11bde5caf2
5 changed files with 65 additions and 1 deletions

View file

@ -84,6 +84,34 @@ namespace Tests
Test.Assert(a == 1);
Test.Assert(b == 2);
ee = default;
switch (ee)
{
case default:
Test.Assert(true);
default:
Test.Assert(false);
}
ee = .B(123);
switch (ee)
{
case default:
Test.Assert(false);
default:
Test.Assert(true);
}
switch (ee)
{
case .B(100):
Test.Assert(false);
case .B(123):
Test.Assert(true);
default:
Test.Assert(false);
}
EnumF ef = .EE(.C(3, 4));
switch (ef)
{