mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Allow (int[*]) { 1, 2 } cast style initialization. Experimental change from [*] to [?]. Fix issue where compile time declarations in expression list would not be handled properly.
This commit is contained in:
@@ -2,7 +2,7 @@ module std::core::bitorder @test;
|
||||
|
||||
fn void test_read()
|
||||
{
|
||||
char[*] bytes = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 };
|
||||
char[?] bytes = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 };
|
||||
|
||||
assert(bitorder::read(bytes, UShortBE) == 0x0102);
|
||||
assert(bitorder::read(bytes, UShortLE) == 0x0201);
|
||||
@@ -28,7 +28,7 @@ fn void test_read()
|
||||
|
||||
fn void test_write()
|
||||
{
|
||||
char[*] bytes = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 };
|
||||
char[?] bytes = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 };
|
||||
char[8] buf;
|
||||
|
||||
ushort x1 = bitorder::read(bytes, UShortBE);
|
||||
|
||||
Reference in New Issue
Block a user