On Saturday, 22 March 2014 at 13:21:45 UTC, Adam D. Ruppe wrote:
On Saturday, 22 March 2014 at 13:01:11 UTC, Nordlöw wrote:
gives same error

That's because you made the alias local, UFCS only works with global symbols right now (which is actually by design, though I don't think it is a great design). So this works:

// move these out to module scope
    import std.string;
    alias z = toStringz;

unittest {
    import std.stdio: wln = writeln;
    wln(typeof("a".z).stringof); // now we're good/
}

Ok. Great.

Still...I believe a warning hint should be outputted. This is not obvious.

/Per

Reply via email to