1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Mixin name uniquing, 'this' for mixins

This commit is contained in:
Brian Fiete 2020-06-20 17:25:37 -07:00
parent 1a17780847
commit 4d53f185d8
8 changed files with 180 additions and 93 deletions

View file

@ -25,4 +25,14 @@ StepOver()
AssertLineContains("a + 20000")
StepOver()
AssertLineContains("a + 30000")
AssertLineContains("a + 30000")
StepOut()
StepOver()
StepInto()
AssertEvalEquals("mStr.mLength", "6")
AssertLineContains("a + mStr.Length")
StepOut()
StepOver()
StepInto()
AssertLineContains("a + b + mStr.Length")

View file

@ -8,7 +8,17 @@ namespace IDETest
{
class ClassA
{
public String mStr;
public String mStr ~ delete _;
public mixin Zorf(int a)
{
a + mStr.Length
}
public mixin Zorf(int a, int b)
{
a + b + mStr.Length
}
}
public static mixin MixA(int a)
@ -40,6 +50,10 @@ namespace IDETest
DeleteAndNullify!(ca.mStr);
int a = 123;
MixC!(1);
ca.mStr = new String("Zorpie");
int val = ca.Zorf!(100);
val = ca.Zorf!(200, 300);
}
}
}