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

Fixed methodRef bindResult value type

This commit is contained in:
Brian Fiete 2021-12-28 06:08:06 -05:00
parent 98eb8f5840
commit fd8e2dd232
3 changed files with 27 additions and 2 deletions

View file

@ -69,9 +69,21 @@ namespace Tests
{
}
class Invoker
{
public int mA = 111;
public void Invoke()
{
mA += 222;
}
}
class TestA
{
Vector2 mVec = .(11, 22);
Event<Action> mEvt ~ _.Dispose();
Action mAct;
public Vector2 Vec
{
@ -84,6 +96,17 @@ namespace Tests
Test.Assert(value.x == 33);
Test.Assert(value.y == 44);
});
Invoker invoker = scope .();
mEvt.Add(new => invoker);
DoIt(=> mEvt);
Test.Assert(invoker.mA == 333);
DoIt(=> invoker);
Test.Assert(invoker.mA == 555);
mAct = scope => invoker;
mAct();
Test.Assert(invoker.mA == 777);
DoIt(=> mAct);
Test.Assert(invoker.mA == 999);
}
}