mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Hex string formatter check incorrectly rejected slices.
This commit is contained in:
committed by
Christoffer Lerno
parent
fad87b294b
commit
59a1590955
12
test/test_suite/statements/format_hex_array.c3
Normal file
12
test/test_suite/statements/format_hex_array.c3
Normal 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");
|
||||
}
|
||||
Reference in New Issue
Block a user