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

Added [?] implied size for sized arrays with initializers

This commit is contained in:
Brian Fiete 2020-06-13 08:36:39 -07:00
parent 82d2963a9e
commit 08e38a03f9
10 changed files with 250 additions and 162 deletions

View file

@ -5,6 +5,7 @@ namespace Tests
class SizedArrays
{
public static int[8] iArr = .(123, 234, 345, );
public static int[?] iArr2 = .(12, 23, 34);
[Test]
static void TestBasics()
@ -24,6 +25,12 @@ namespace Tests
val2[0][0] = 9;
Test.Assert(val0 != val2);
Test.Assert(val2[1] == val1);
int[?] val3 = .(9, 10);
Test.Assert(val3[0] == 9);
var val4 = int[?](11, 12);
Test.Assert(val4[0] == 11);
}
[Test]