mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-04 15:26:00 +02:00
Fixed conv operator invocation of params
value
This commit is contained in:
parent
438394099a
commit
1f5a56488b
2 changed files with 39 additions and 10 deletions
|
@ -121,6 +121,19 @@ namespace Tests
|
|||
{
|
||||
}
|
||||
|
||||
public static int ParamsA(int a, params Span<int> ints)
|
||||
{
|
||||
int result = a;
|
||||
for (var i in ints)
|
||||
result += i;
|
||||
return result;
|
||||
}
|
||||
|
||||
public static int ParamsB(int a, params int[] ints)
|
||||
{
|
||||
return ParamsA(a, params ints);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public static void TestBasics()
|
||||
{
|
||||
|
@ -149,6 +162,9 @@ namespace Tests
|
|||
InCallObj("Hey");
|
||||
Valueless valueless;
|
||||
InCallValueless(valueless);
|
||||
|
||||
Test.Assert(ParamsA(100, 20, 3) == 123);
|
||||
Test.Assert(ParamsB(100, 20, 3) == 123);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue