[Issue 13451] New: Lambda syntax with explicit return type not documented
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Sep 9 16:32:04 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13451
Issue ID: 13451
Summary: Lambda syntax with explicit return type not documented
Product: D
Version: D2
Hardware: All
URL: http://dlang.org/grammar.html#Lambda
OS: All
Status: NEW
Keywords: spec
Severity: normal
Priority: P1
Component: websites
Assignee: nobody at puremagic.com
Reporter: briancschott at gmail.com
Blocks: 10233
---
fp = function int(int a) => a;
---
This code is accepted by DMD but cannot be produced by the grammar:
FunctionLiteral:
function Type(opt) ParameterAttributes(opt) FunctionBody
delegate Type(opt) ParameterAttributes(opt) FunctionBody
ParameterAttributes FunctionBody
FunctionBody
Lambda
ParameterAttributes:
Parameters
Parameters FunctionAttributes
Lambda:
Identifier => AssignExpression
function(opt) ParameterAttributes => AssignExpression
delegate(opt) ParameterAttributes => AssignExpression
--
More information about the Digitalmars-d-bugs
mailing list