mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-20 08:58:00 +02:00
Fixed lambda bind to delegate type with outer generic
This commit is contained in:
parent
58370d2c8c
commit
16cd9f7a77
4 changed files with 16 additions and 5 deletions
|
@ -98,6 +98,11 @@ namespace Tests
|
|||
}
|
||||
}
|
||||
|
||||
class ClassB<T>
|
||||
{
|
||||
public delegate int DelegateB(T val);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public static void TestBasics()
|
||||
{
|
||||
|
@ -138,6 +143,9 @@ namespace Tests
|
|||
val1.TestLambda();
|
||||
ClassA ca = scope .();
|
||||
ca.TestLambda();
|
||||
|
||||
ClassB<int8>.DelegateB dlg2 = scope (val) => val + 123;
|
||||
Test.Assert(dlg2(3) == 126);
|
||||
}
|
||||
|
||||
public static void Modify(ref int a, ref Splattable b)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue