1
0
Fork 0
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:
Brian Fiete 2020-03-31 07:46:01 -07:00
parent c62dbdf811
commit de6a68911a
8 changed files with 143 additions and 32 deletions

View file

@ -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;
}
}
}