mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-27 20:18:01 +02:00
Initial checkin
This commit is contained in:
parent
c74712dad9
commit
078564ac9e
3242 changed files with 1616395 additions and 0 deletions
31
IDE/Tests/Test1/src/Lambdas.bf
Normal file
31
IDE/Tests/Test1/src/Lambdas.bf
Normal file
|
@ -0,0 +1,31 @@
|
|||
#pragma warning disable 168
|
||||
|
||||
namespace IDETest
|
||||
{
|
||||
class LambdaTester
|
||||
{
|
||||
public int mA = 123;
|
||||
public int mB = 234;
|
||||
|
||||
public void Test1()
|
||||
{
|
||||
int outerVar = 88;
|
||||
|
||||
delegate int(int argA0) dlg = scope (argA1) =>
|
||||
{
|
||||
int a = mA;
|
||||
int b = outerVar;
|
||||
return 222;
|
||||
};
|
||||
|
||||
//LambdaTest_Test1
|
||||
dlg(99);
|
||||
}
|
||||
|
||||
public static void Test()
|
||||
{
|
||||
LambdaTester lt = scope .();
|
||||
lt.Test1();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue