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

Fixed LoadProperty for struct pointers

This commit is contained in:
Brian Fiete 2023-06-28 16:21:37 -04:00
parent ba0ff23e9d
commit 1aa99da714
2 changed files with 46 additions and 8 deletions

View file

@ -92,6 +92,16 @@ namespace Tests
}
}
struct StructD
{
public int Val => 123;
}
struct StructE : StructD
{
}
class ClassB
{
public StructA B { get; set; }
@ -131,6 +141,16 @@ namespace Tests
return val.Val;
}
static void TestVal(int val)
{
}
static void TestVal(float val)
{
}
[Test]
public static void TestBasics()
{
@ -177,6 +197,10 @@ namespace Tests
int ap2 = StructA.sAutoProp++;
Test.Assert(ap2 == 3);
Test.Assert(StructA.sAutoProp == 4);
StructE* se = scope .();
StructE*[2] seArr = .(se, se);
Test.Assert((seArr[0].Val + seArr[1].Val) == 123*2);
}
}
}