1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-16 15:24:10 +02:00

Added reflection category to distinct build options (wip)

This commit is contained in:
Brian Fiete 2020-07-11 16:24:07 -07:00
parent 5cb6570e14
commit 037b2ac1e4
15 changed files with 538 additions and 94 deletions

View file

@ -47,6 +47,20 @@ namespace Tests
}
}
class Singleton<T> where T : Singleton<T>
{
public static T mInstance;
protected this()
{
mInstance = (T)this;
}
}
class ClassC : Singleton<ClassC>
{
}
static void DoDispose<T>(mut T val) where T : IDisposable
{
val.Dispose();
@ -119,6 +133,9 @@ namespace Tests
Test.Assert(MethodA("") == 1);
Test.Assert(MethodA(1.2f) == 2);
Test.Assert(MethodA(TypeCode.Boolean) == 3);
ClassC cc = scope .();
Test.Assert(ClassC.mInstance == cc);
}
}