mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-04 15:26:00 +02:00
Partial recursive generic fixes, deferred constraint type validation
This commit is contained in:
parent
3681b521b5
commit
eb86c717f0
9 changed files with 162 additions and 53 deletions
|
@ -1,3 +1,4 @@
|
|||
using System;
|
||||
namespace Tests
|
||||
{
|
||||
class Classes
|
||||
|
@ -22,5 +23,22 @@ namespace Tests
|
|||
{
|
||||
}
|
||||
}
|
||||
|
||||
class ClassA<T0, T1>
|
||||
{
|
||||
//public ClassA<T0, ClassA<T0, T1>> mVal;
|
||||
|
||||
public ClassA<T0, ClassA<T0, T1>> GetRecursive()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
static void TestBasics()
|
||||
{
|
||||
ClassA<int, float> ca = scope .();
|
||||
Test.Assert(typeof(decltype(ca.GetRecursive())) == typeof(ClassA<int, ClassA<int, float>>));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,6 +95,16 @@ namespace Tests
|
|||
}
|
||||
}
|
||||
|
||||
class IFaceA<T0, T1> where T0 : Dictionary<T1, int> where T1 : IHashable
|
||||
{
|
||||
Dictionary<T1, int> mDict;
|
||||
}
|
||||
|
||||
public static void MethodA<T0, T1>() where T0 : Dictionary<T1, int> where T1 : IHashable
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
public static void TestBasics()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue