Strange error happens only with -inline flag
finalpatch
fengli at gmail.com
Wed Jun 12 23:06:06 PDT 2013
The following code compiles fine with the command "dmd test.d"
import std.array, std.algorithm, std.algorithm, std.string;
void main()
{
int[string] s;
auto a = join(map!(a=>format("%s %d", a, s[a]))(s.keys));
}
However, if I try to compile it with "dmd -inline test.d", I get
this error message:
test.d(5): Error: function D main is a nested function and cannot
be accessed from std.array.join!(MapResult!(__lambda2,
string[])).join
Isn't -inline supposed to be completely transparent?
More information about the Digitalmars-d
mailing list