mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-19 16:40:26 +02:00
New function/delegate casting rules, similar to tuple rules
This commit is contained in:
parent
c62dbdf811
commit
de6a68911a
8 changed files with 143 additions and 32 deletions
|
@ -1,3 +1,5 @@
|
|||
#pragma warning disable 168
|
||||
|
||||
using System;
|
||||
|
||||
namespace Tests
|
||||
|
@ -137,5 +139,16 @@ namespace Tests
|
|||
ClassA ca = scope .();
|
||||
ca.TestLambda();
|
||||
}
|
||||
|
||||
public static void TestCasting()
|
||||
{
|
||||
delegate int(int, int) dlg0 = null;
|
||||
delegate int(int a, int b) dlg1 = dlg0;
|
||||
delegate int(int a2, int b2) dlg2 = (.)dlg1;
|
||||
|
||||
function int(int, int) func0 = null;
|
||||
function int(int a, int b) func1 = func0;
|
||||
function int(int a2, int b2) func2 = (.)func1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue