[Issue 1351] Discrepancies in the language specification
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jul 31 00:28:37 PDT 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1351
------- Comment #8 from aziz.kerim at gmail.com 2007-07-31 02:28 -------
(In reply to comment #6)
> (In reply to comment #0)
> > FunctionLiteral // missing colon
> > function Typeopt ( ParameterList )opt FunctionBody // Allows for
> > literals like "function int {}". Is this legal?
>
> If it weren't meant to be, surely there wouldn't be the statement
>
> "If omitted it defaults to the empty argument list ()."
Ok, but DMD doesn't allow you to declare such delegate or function literals:
auto bla = delegate void {}; // Error: found '{' when expecting '(' (other
errors omitted)
Seems to be a bug in the compiler or the specification.
> But it does seem to be a mistake that that paragraph talks of ArgumentList
> instead of ParameterList.
Yep, ArgumentList should be ParameterList in that paragraph.
--
More information about the Digitalmars-d-bugs
mailing list