Hi,

I use assert(false, tmp) to see the content of variable tmp as it seems there is no other way in CTFE.

The output is kind of weired:
app.d(6): Error: "1234\x0a5678\x0a"[4..10]
app.d(17):        called from here: test("1234\x0a5678\x0a")

I wrote the source code on windows with a source file with \r\n file endings.
But the console output has only the character X0a.
In addition not the content of tmp is shown but the full content with the slice information [4..10].

Is this the intented behavior?

string test(string s)
{
    string tmp = s;
    tmp = tmp[4..$];
    assert(false, tmp);
    return tmp;
}

enum foo =
`1234
5678
`;

void main()
{
    enum bar = test(foo);
}

Kind regards
André

Reply via email to