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

Fixed premature enum finalization during cast

This commit is contained in:
Brian Fiete 2022-02-12 14:21:52 -05:00
parent ef942366db
commit 95c6b1db98
2 changed files with 16 additions and 4 deletions

View file

@ -43,6 +43,17 @@ namespace Tests
case EE(EnumE ee);
}
enum EnumG
{
case A = (.)'A';
case B = (.)'B';
public void Set(int val) mut
{
this = (.)val;
}
}
[Test]
static void TestBasic()
{
@ -122,7 +133,10 @@ namespace Tests
}
ee = .B(10);
EnumG eg = .A;
eg.Set(66);
Test.Assert(eg == .B);
}
}
}