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

Fixed the lambda hotswap change

This commit is contained in:
Brian Fiete 2019-09-04 05:57:56 -07:00
parent 1e04bb1b3e
commit c5dca50e50
6 changed files with 55 additions and 231 deletions

View file

@ -100,6 +100,20 @@ class Blurg
delegate void() mFuncA;
delegate void() mFuncB;
int mA = 123;
public this()
{
delegate void() dlg = new () =>
{
//PrintF("Hey! %d\n", mA);
};
dlg();
dlg();
dlg();
dlg();
}
void TestIt(int a, int b, int c)
{
@ -108,28 +122,7 @@ class Blurg
public static void Hey()
{
int a = 123;
Blurg blurg = scope .();
blurg.mFuncA = new () =>
{
PrintF("YoA!\n");
PrintF("A %d!\n", a);
PrintF("Blurg: %p\n", blurg);
};
blurg.mFuncB = new () =>
{
PrintF("YoB!\n");
};
blurg.TestIt(1, 2, 3);
blurg.[Friend]TestIt(1, 2, 3);
while (true)
{
blurg.mFuncA();
blurg.mFuncB();
}
Blurg bl = scope .();
}
}