1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00
This commit is contained in:
Brian Fiete 2019-12-09 10:29:54 -08:00
parent 601b08fb2d
commit b900ec1a4a
2 changed files with 54 additions and 0 deletions

View file

@ -11,4 +11,9 @@ AssertFileErrors()
ShowFile("src/LocalVars.bf")
WaitForResolve()
SleepTicks(20)
AssertFileErrors()
ShowFile("src/Defer.bf")
WaitForResolve()
SleepTicks(20)
AssertFileErrors()

View file

@ -0,0 +1,49 @@
#pragma warning disable 168
using System;
namespace IDETest
{
class Defer
{
public int ReturnFromDefer()
{
defer
{
return 123; //FAIL
}
return 0;
}
public int BreakFromDefer()
{
for (int i < 10)
{
defer
{
break; //FAIL
}
defer
{
continue; //FAIL
}
}
Block:
for (int j < 20)
{
for (int i < 10)
{
defer
{
//break Block;
}
}
}
return 0;
}
}
}