Comment #0 by bearophile_hugs — 2013-02-21T13:26:09Z
import std.algorithm: sort, group;
void main() pure {
group(sort([1]));
}
Maybe that code reveals a missing template constraint, dmd 2.063alpha:
temp2b.d(3): Error: pure function 'main' cannot call impure function 'sort'
temp2b.d(3): Error: pure function 'main' cannot call impure function 'group'
C:\dmd2\src\phobos\std\array.d(2095): Error: this for _data needs to be type Appender not type Appender!(string)
C:\dmd2\src\phobos\std\array.d(2096): Error: this for _data needs to be type Appender not type Appender!(string)
C:\dmd2\src\phobos\std\array.d(2108): Error: this for _data needs to be type Appender not type Appender!(string)
C:\dmd2\src\phobos\std\array.d(2109): Error: this for _data needs to be type Appender not type Appender!(string)
C:\dmd2\src\phobos\std\array.d(2119): Error: this for _data needs to be type Appender not type Appender!(string)
C:\dmd2\src\phobos\std\array.d(2120): Error: this for _data needs to be type Appender not type Appender!(string)
C:\dmd2\src\phobos\std\array.d(2121): Error: this for _data needs to be type Appender not type Appender!(string)
C:\dmd2\src\phobos\std\array.d(2124): Error: this for _data needs to be type Appender not type Appender!(string)
C:\dmd2\src\phobos\std\array.d(2127): Error: this for _data needs to be type Appender not type Appender!(string)
C:\dmd2\src\phobos\std\array.d(2128): Error: this for _data needs to be type Appender not type Appender!(string)
C:\dmd2\src\phobos\std\array.d(2128): Error: this for _data needs to be type Appender not type Appender!(string)
C:\dmd2\src\phobos\std\array.d(2129): Error: this for _data needs to be type Appender not type Appender!(string)
C:\dmd2\src\phobos\std\array.d(2133): Error: this for _data needs to be type Appender not type Appender!(string)
C:\dmd2\src\phobos\std\array.d(2137): Error: this for _data needs to be type Appender not type Appender!(string)
C:\dmd2\src\phobos\std\array.d(2144): Error: this for _data needs to be type Appender not type Appender!(string)
C:\dmd2\src\phobos\std\array.d(2146): Error: this for _data needs to be type Appender not type Appender!(string)
C:\dmd2\src\phobos\std\array.d(2147): Error: this for _data needs to be type Appender not type Appender!(string)
C:\dmd2\src\phobos\std\array.d(2160): Error: this for _data needs to be type Appender not type const(Appender!(string))
C:\dmd2\src\phobos\std\array.d(2160): Error: this for _data needs to be type Appender not type const(Appender!(string))
Comment #1 by k.hara.pg — 2013-07-13T06:42:15Z
With 2.064a (a608afd9b4d756bb4be3f5ebfa8bb471176be04d):
test.d(3): Error: pure function 'D main' cannot call impure function 'std.algorithm.sort!("a < b", cast(SwapStrategy)0, int[]).sort'
There's no error message flood.