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:
parent
5cb6570e14
commit
037b2ac1e4
15 changed files with 538 additions and 94 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue