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

For for 'in' with unqualified dot constructor

This commit is contained in:
Brian Fiete 2024-07-23 13:39:16 +02:00
parent 62a171c649
commit b0b85b7b43
2 changed files with 26 additions and 0 deletions

View file

@ -126,6 +126,11 @@ namespace Tests
{
}
public static int InCallStruct(in StructA val)
{
return val.mA + val.mB;
}
public static int ParamsA(int a, params Span<int> ints)
{
int result = a;
@ -207,6 +212,9 @@ namespace Tests
StructA sa2 = .(200, 201);
StructA sa3 = .(300, 301);
Test.Assert(InCallStruct(sa) == 201);
Test.Assert(InCallStruct(.(200, 202)) == 402);
Test.Assert(Method0(sa) == 100);
Test.Assert(Method1(sa, sa2) == 200);
Test.Assert(Method2(sa, sa2, sa3) == 300);