1
0
Fork 0
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:
Brian Fiete 2021-02-16 14:53:48 -08:00
parent 3681b521b5
commit eb86c717f0
9 changed files with 162 additions and 53 deletions

View file

@ -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>>));
}
}
}

View file

@ -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()
{