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 .A:' after a 'case .A(let value):'

This commit is contained in:
Brian Fiete 2023-07-24 12:52:23 -07:00
parent 11bde5caf2
commit 71dc0ab9d7
2 changed files with 47 additions and 6 deletions

View file

@ -112,6 +112,26 @@ namespace Tests
Test.Assert(false);
}
switch (ee)
{
case .B(123):
Test.Assert(true);
case .B:
Test.Assert(false);
default:
Test.Assert(false);
}
switch (ee)
{
case .A:
case .B(123):
Test.Assert(true);
case .B:
Test.Assert(false);
case .C:
}
EnumF ef = .EE(.C(3, 4));
switch (ef)
{