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

Support for out variable declarations in mixin arguments

This commit is contained in:
Brian Fiete 2020-09-22 13:41:18 -07:00
parent 8b8d7fd782
commit 9a7bb95107
2 changed files with 57 additions and 8 deletions

View file

@ -37,6 +37,16 @@ namespace Tests
}
}
static mixin GetVal(var a)
{
a = 123;
}
static mixin GetVal2(out int a)
{
a = 234;
}
[Test]
public static void TestBasics()
{
@ -47,6 +57,11 @@ namespace Tests
Test.Assert(mc.mA == 120);
Test.Assert(MixClass.MixC!(30) == 230);
Test.Assert(cVal == 0x305);
GetVal!(int val1);
Test.Assert(val1 == 123);
GetVal2!(var val2);
Test.Assert(val2 == 234);
}
[Test]