mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fixed invalid generic inference from generic constraints
This commit is contained in:
parent
4189d10f41
commit
03e28f3add
4 changed files with 35 additions and 3 deletions
|
@ -85,5 +85,23 @@ namespace IDETest
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
public static void TestGen<T, TItem>(T val)
|
||||
where T : IEnumerator<TItem>
|
||||
where TItem : var
|
||||
{
|
||||
Console.WriteLine(typeof(decltype(val)).ToString(.. scope .()));
|
||||
}
|
||||
|
||||
public static void TestPreGen<T>()
|
||||
{
|
||||
T a = default;
|
||||
TestGen(a); //FAIL Unable to determine generic argument 'TItem'
|
||||
}
|
||||
|
||||
public static void TestGenBug()
|
||||
{
|
||||
TestPreGen<List<int>>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue