On Thursday, 14 May 2015 at 00:29:06 UTC, Dennis Ritchie wrote:
Why doesn't the compiler produces an error?

-----
import std.stdio;

void main() {
        writeln({});
}
-----
http://ideone.com/qTZCAd

You told it to output a function literal, so it did.

(That or you told it to output a struct literal, but the compiler has arbitrarily decided that it's a function literal. This is NOT my favorite part of D's grammar.)

Reply via email to