[Issue 15027] cannot pass arguments of type DirEntry to std.file functions
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Oct 6 00:08:44 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=15027
--- Comment #11 from Martin Nowak <code at dawg.eu> ---
Slight variation of the bug where the aliased string is an lvalue, but cannot
be assigned.
cat > bug.d << CODE
struct InternedString
{
void opAssign(InternedString other)
{
this.data = other.data;
}
string data;
alias data this;
}
auto bug(InternedString s)
{
import std.file : exists;
return exists(s);
}
CODE
This breaks b/c some code in utf.d tries to `r = r[1 .. $]` slice an
InternedString.
--
More information about the Digitalmars-d-bugs
mailing list