https://issues.dlang.org/show_bug.cgi?id=22599
Issue ID: 22599
Summary: Infinite loop using join with alias this
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: [email protected]
Reporter: [email protected]
Running the code below results in an infinite loop.
Removing alias this, the map call or using ascii makes the code run as
expected.
```
import std.algorithm: map;
import std.array: join;
struct T
{
string a;
alias a this;
}
void main()
{
auto t = [ T("أ") ]; // has to contain non-ascii unicode (this is the
arabic letter أ)
auto s = t.map!(same => same).join();
}
```
--