Function Literals
Brian Schott via Digitalmars-d
digitalmars-d at puremagic.com
Tue Apr 15 11:32:50 PDT 2014
On Tuesday, 15 April 2014 at 18:11:13 UTC, Brian Schott wrote:
> Invalid, accepted by DMD:
>
> // No semicolon needed if there's only one
> void function() a = {writeln("a");}
Sorry, disregard this one.
In its place, let's use this, which is valid and rejected by DMD:
void function() bar {}
Decl:
StorageClasses(opt) BasicType Declarator FunctionBody
More information about the Digitalmars-d
mailing list