File tree Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Expand file tree Collapse file tree 3 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -2083,16 +2083,18 @@ $(GNAME RefOrAutoRef):
2083
2083
$(D auto ref)
2084
2084
)
2085
2085
2086
- $(P $(I FunctionLiteral)s (also known as $(LNAME2 lambdas, $(I Lambdas))) enable embedding anonymous functions
2086
+ $(P $(I FunctionLiteral)s enable embedding anonymous functions
2087
2087
and anonymous delegates directly into expressions.
2088
- $(I Type) is the return type of the function or delegate -
2088
+ Short function literals are known as $(LNAME2 lambdas, $(I lambdas)).
2089
+ )
2090
+ * $(I Type) is the return type of the function or delegate -
2089
2091
if omitted it is $(RELATIVE_LINK2 lambda-return-type, inferred).
2090
- $(I ParameterWithAttributes) or $(I ParameterWithMemberAttributes)
2092
+ * $(I ParameterWithAttributes) or $(I ParameterWithMemberAttributes)
2091
2093
can be used to specify the parameters for the function. If these are
2092
2094
omitted, the function defaults to the empty parameter list $(D ( )).
2093
- The type of a function literal is a
2095
+ * Parameter types can be $(RELATIVE_LINK2 lambda-parameter-inference, omitted).
2096
+ * The type of a function literal is a
2094
2097
$(DDSUBLINK spec/function, closures, delegate or a pointer to function).
2095
- )
2096
2098
2097
2099
$(P For example:)
2098
2100
Original file line number Diff line number Diff line change @@ -32,8 +32,7 @@ $(GNAME Parameters):
32
32
33
33
$(GNAME ParameterList):
34
34
$(GLINK Parameter)
35
- $(GLINK Parameter) $(D ,)
36
- $(GLINK Parameter) $(D ,) $(GSELF ParameterList)
35
+ $(GLINK Parameter) $(D ,) $(GSELF ParameterList)$(OPT)
37
36
$(GLINK VariadicArgumentsAttributes)$(OPT) $(D ...)
38
37
39
38
$(GNAME Parameter):
Original file line number Diff line number Diff line change @@ -784,7 +784,7 @@ $(H4 $(LNAME2 alias_value, Value Aliases))
784
784
------
785
785
))
786
786
787
- $(LI Lambdas
787
+ $(LI Function Literals
788
788
$(SPEC_RUNNABLE_EXAMPLE_COMPILE
789
789
------
790
790
template Foo(alias fun)
You can’t perform that action at this time.
0 commit comments