mirror of
https://github.com/beefytech/Beef.git
synced 2025-07-06 08:15:59 +02:00
Improving auto-implemented properties
This commit is contained in:
parent
66aeb0a302
commit
664078557f
7 changed files with 212 additions and 24 deletions
|
@ -1,9 +1,9 @@
|
|||
ShowFile("src/Protection.bf")
|
||||
ShowFile("src/Cases.bf")
|
||||
WaitForResolve()
|
||||
SleepTicks(20)
|
||||
AssertFileErrors()
|
||||
|
||||
ShowFile("src/Cases.bf")
|
||||
ShowFile("src/Defer.bf")
|
||||
WaitForResolve()
|
||||
SleepTicks(20)
|
||||
AssertFileErrors()
|
||||
|
@ -13,7 +13,12 @@ WaitForResolve()
|
|||
SleepTicks(20)
|
||||
AssertFileErrors()
|
||||
|
||||
ShowFile("src/Defer.bf")
|
||||
ShowFile("src/Properties.bf")
|
||||
WaitForResolve()
|
||||
SleepTicks(20)
|
||||
AssertFileErrors()
|
||||
AssertFileErrors()
|
||||
|
||||
ShowFile("src/Protection.bf")
|
||||
WaitForResolve()
|
||||
SleepTicks(20)
|
||||
AssertFileErrors()
|
||||
|
|
35
IDE/Tests/CompileFail001/src/Properties.bf
Normal file
35
IDE/Tests/CompileFail001/src/Properties.bf
Normal file
|
@ -0,0 +1,35 @@
|
|||
namespace IDETest
|
||||
{
|
||||
class Properties
|
||||
{
|
||||
struct StructA
|
||||
{
|
||||
public int mA = 111;
|
||||
|
||||
public this()
|
||||
{
|
||||
}
|
||||
|
||||
public this(int a)
|
||||
{
|
||||
mA = a;
|
||||
}
|
||||
}
|
||||
|
||||
struct StructB
|
||||
{
|
||||
public StructA B { get; }
|
||||
|
||||
int mZ = 9;
|
||||
|
||||
public this() //FAIL
|
||||
{
|
||||
}
|
||||
|
||||
public void Yoop() mut
|
||||
{
|
||||
B = .(); //FAIL
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue