Hex string formatter check incorrectly rejected slices.

This commit is contained in:
Christoffer Lerno
2025-06-30 21:41:35 +02:00
committed by Christoffer Lerno
parent fad87b294b
commit 59a1590955
4 changed files with 18 additions and 4 deletions

View File

@@ -0,0 +1,12 @@
import std::io;
macro convert_string_to_hex(String s)
{
io::printfn("%02hx", (char[])s);
}
fn void main() {
char[3] x = x"0305ff";
io::printfn("%02h", x);
convert_string_to_hex("colors");
}