Comment #0 by dlang-bugzilla — 2015-07-02T17:58:08Z
///////////// test.d /////////////
import std.file;
struct Stringish
{
string s;
alias s this;
}
void main()
{
auto fn = Stringish("test.d");
readText(fn);
}
//////////////////////////////////
This now fails with this error output:
C:\...\std\utf.d(3608,38): Error: cannot implicitly convert expression (front(this.r.s)) of type dchar to ubyte
C:\...\std\utf.d(3608,38): Error: cannot implicitly convert expression (front(this.r.s)) of type dchar to ubyte
C:\...\std\utf.d(3608,38): Error: cannot implicitly convert expression (front(this.r.s)) of type dchar to ubyte
C:\...\std\utf.d(3442,32): Error: template instance std.utf.byDchar!(Stringish) error instantiating
C:\...\std\internal\cstring.d(188,40): instantiated from here: byWchar!(Stringish)
C:\...\std\file.d(245,54): instantiated from here: tempCString!(wchar, Stringish)
C:\...\std\file.d(412,35): instantiated from here: read!(Stringish)
test.d(12,10): instantiated from here: readText!(string, Stringish)
C:\...\std\internal\cstring.d(188,5): Error: forward reference to inferred return type of function call __r3083.front()
C:\...\std\internal\cstring.d(86,6): Error: function std.internal.cstring.tempCString!(wchar, Stringish).tempCString no return exp; or assert(0); at end of function
Comment #1 by code — 2015-07-21T08:13:24Z
This applies to all newly rangified functions, e.g. std.string.indexOf changes break vibe.d.
We need a list of all the rangified functions for the changelog anyhow, so ideally we'd compile that list and then check each function for this bug.
Comment #2 by bugzilla — 2015-07-22T01:47:32Z
(In reply to Martin Nowak from comment #1)
> This applies to all newly rangified functions, e.g. std.string.indexOf
> changes break vibe.d.
It applies to more than that. It turns out to be yet another facet of the autodecoding misfeature.
There is a slight variation of this bug, where a former Char[] parameter was replaced by Range and no longer accepts static arrays.
It has been fixed for indexOf, but we should check whether other functions are affected too.
https://github.com/D-Programming-Language/phobos/pull/3191
Comment #5 by github-bugzilla — 2015-07-23T22:42:11Z