Fix hex strings being printed as regular strings

This commit is contained in:
Dennis Korpel 2024-01-25 10:59:45 +01:00 committed by The Dlang Bot
parent 8bf2b08a1b
commit 5fe90b63d3
6 changed files with 46 additions and 12 deletions

View file

@ -256,6 +256,10 @@ void testHexstring()
// Test that mangling of StringExp with size 8 is the same as array literal mangling:
void f(immutable ulong[] a)() {}
static assert(f!y.mangleof == f!([0x1122334455667788, 0xAABBCCDDEEFF0099]).mangleof);
// Test printing StringExp with size 8
enum toStr(immutable ulong[] v) = v.stringof;
static assert(toStr!y == `x"88776655443322119900FFEEDDCCBBAA"`);
}
/***************************************************/