https://issues.dlang.org/show_bug.cgi?id=20309

berni44 <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]
          Component|phobos                      |dmd

--- Comment #1 from berni44 <[email protected]> ---
Reduced example:

```
import std.stdio;
import std.range : chain;

struct Test 
{
    auto filename() const { return chain("a", "b"); }
    alias filename this;
}

void main() 
{
    auto name = Test();
    writeln(name.front);
    name.popFront();
    writeln(name.front);
}
```

name.front and name.popFront always call filename(), which returns a new range
object... This is IMHO not a phobos bug.

--

Reply via email to