mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-22 09:38:01 +02:00
Fix generic binding in generic mixins
This commit is contained in:
parent
627b0381f8
commit
51eaa6276f
3 changed files with 47 additions and 4 deletions
|
@ -84,6 +84,19 @@ namespace Tests
|
|||
res.Value
|
||||
}
|
||||
|
||||
static mixin DisposeIt<T>(T val) where T : IDisposable
|
||||
{
|
||||
val?.Dispose();
|
||||
}
|
||||
|
||||
class DispClass : IDisposable
|
||||
{
|
||||
void IDisposable.Dispose()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public static void TestBasics()
|
||||
{
|
||||
|
@ -114,6 +127,9 @@ namespace Tests
|
|||
Dictionary<int, Dictionary<int, int>> test = scope .() {(1,null)};
|
||||
int val = CircularMixin!(test);
|
||||
Test.Assert(val == 211);
|
||||
|
||||
DispClass dc = scope .();
|
||||
DisposeIt!(dc);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue