1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Fixed break targeting switch label

This commit is contained in:
Brian Fiete 2024-11-20 11:33:28 -05:00
parent ac67046afc
commit 908a76b92a
3 changed files with 25 additions and 1 deletions

View file

@ -1,3 +1,5 @@
#pragma warning disable 168
using System;
namespace Tests
@ -42,6 +44,27 @@ namespace Tests
Shape shape = .Circle(10, 20, 30);
Test.Assert(Switch1(shape) == 12);
int val = 123;
int result = 0;
switch (val)
{
case 0:
result = 1;
default:
SWITCH2:
switch (val)
{
case 2:
result = 2;
default:
result = 3;
break SWITCH2;
}
result = 4;
}
Test.Assert(result == 4);
}
}
}