| 1 |
/* |
| 2 |
https://issues.dlang.org/show_bug.cgi?id=24036 |
| 3 |
Issue 24036 - assert message in CTFE becomes `['m', 'e', 's', 's', 'a', 'g', 'e'][0..7]` if produced using std.format.format |
| 4 |
|
| 5 |
TEST_OUTPUT: |
| 6 |
--- |
| 7 |
fail_compilation/test24036.d(19): Error: message |
| 8 |
fail_compilation/test24036.d(21): called from here: `(*function () pure nothrow @safe => 42)()` |
| 9 |
--- |
| 10 |
*/ |
| 11 |
|
| 12 |
auto format() |
| 13 |
{ |
| 14 |
return ['m', 'e', 's', 's', 'a', 'g', 'e'][0 .. 7]; |
| 15 |
} |
| 16 |
|
| 17 |
immutable ctfeThing = () |
| 18 |
{ |
| 19 |
assert(0, format()); |
| 20 |
return 42; |
| 21 |
}(); |