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

Improved method selection with unspecialized arguments

This commit is contained in:
Brian Fiete 2020-08-01 07:48:59 -07:00
parent 1fc6b31ffa
commit ae89a29fd8
3 changed files with 132 additions and 85 deletions

View file

@ -71,6 +71,16 @@ namespace Tests
return MethodB(val);
}
public static int MethodD<T>(ref T[] x)
{
return 1;
}
public static int MethodD<T>(ref T[][] x)
{
return 2;
}
[Test]
public static void TestBasics()
{
@ -104,6 +114,9 @@ namespace Tests
Test.Assert(MethodB(11) == 2);
Test.Assert(MethodB(("A", "B")) == 3);
Test.Assert(MethodC(("A", "B")) == 3);
int[][] arrArr = new int[1][];
Test.Assert(MethodD(ref arrArr) == 2);
}
}
}