It was possible to create 0 length arrays using byte literals. #1678

This commit is contained in:
Christoffer Lerno
2024-12-14 02:49:30 +01:00
parent 68c60f58c0
commit a8aad53038
4 changed files with 15 additions and 0 deletions

View 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);
}