mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
It was possible to create 0 length arrays using byte literals. #1678
This commit is contained in:
8
test/test_suite/constants/empty_byte_literal.c3
Normal file
8
test/test_suite/constants/empty_byte_literal.c3
Normal file
@@ -0,0 +1,8 @@
|
||||
import std;
|
||||
|
||||
fn void main()
|
||||
{
|
||||
char[] cd = {};
|
||||
char[*] b = x""; // #error: must be at least 1 byte
|
||||
io::printfn("%d", b.len);
|
||||
}
|
||||
Reference in New Issue
Block a user