testcase: ------------------------------ import std.stdio; struct A(T) { T[] datas; alias datas this; } void main() { A!uint a; writeln(a); } ------------------------------ compiler warning: toString(uint[]) called from D:\dmd\dmd\windows\bin\..\..\src\phobos\std\format.d(2072) is deprecated. Instead you may want to import std.conv and use to!string(x) instead of toString(x).
This is very odd. If I comment out toString, the example compiles and runs. There must be something odd going on in the compiler. Deferring to Walter.
I'm reassigning this to Walter. It's a failure of alias this. Reduced test case: import std.stdio; struct A(T) { T[] datas; alias datas this; } void main() { uint[] x; x.popFront(); A!uint a; writeln(a); } What should happen is that a.popFront() should forward to a.datas.popFront(), which in turn rewrites itself into popFront(a.datas).
The first test case now compiles without error, and the second does too (once an import to std.array is added).