mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Added '.{ x = 1, y = 2}' initializer expression
This commit is contained in:
parent
b18cdc706c
commit
0692fb44a4
5 changed files with 127 additions and 33 deletions
|
@ -134,6 +134,14 @@ namespace Tests
|
|||
sb1.mA = 1;
|
||||
sb1.mB = 2;
|
||||
Test.Assert(sb0 == sb1);
|
||||
|
||||
sb0 = StructB { mA = 2 };
|
||||
Test.Assert(sb0.mA == 2);
|
||||
Test.Assert(sb0.mB == 0);
|
||||
|
||||
sb0 = .{ mA = 3, mB = 4 };
|
||||
Test.Assert(sb0.mA == 3);
|
||||
Test.Assert(sb0.mB == 4);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue