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

Fixed split deferred call processor

This commit is contained in:
Brian Fiete 2022-08-24 14:49:05 -07:00
parent e09b701e9f
commit acb644830c
6 changed files with 97 additions and 8 deletions

View file

@ -43,6 +43,33 @@ namespace Tests
str.Contains('T');
}*/
public static void Defer0(ref int val)
{
for (int i < 10)
{
defer::
{
val += 100;
}
if (i == 2)
return;
defer::
{
val++;
}
}
}
[Test]
public static void TestBasics()
{
int a = 0;
Defer0(ref a);
Test.Assert(a == 302);
}
public static mixin GetStr()
{
scope:mixin String("TestString")