http://dsource.org/projects/ldc/ticket/402 struct Stdout { static Stdout opCall(int i = 0) { Stdout s; return s; } } void main() { int[char[]] b; Stdout(b["hello"])(); // error, DMDFE thinks you want to declare b // of type Stdout["hello"] int (funcptr[4])(); // declares int[4] funcptr; }
This exact same thing bit me a long time ago. Caused by denial that dmd's parser grammar is context sensitive (or at least infinitely ambiguous). *** This issue has been marked as a duplicate of issue 2392 ***