@@ -2038,7 +2038,7 @@ $(H4 $(LNAME2 cast_array_literal, Casting))
2038
2038
{
2039
2039
// cast array literal
2040
2040
const short[] ct = cast(short[]) [cast(byte)1, 1];
2041
- // this is equivalent with :
2041
+ // this is equivalent to :
2042
2042
// const short[] ct = [cast(short)1, cast(short)1];
2043
2043
writeln(ct); // writes [1, 1]
2044
2044
@@ -2287,13 +2287,13 @@ $(H4 $(LNAME2 lambda-parameter-inference, Parameter Type Inference))
2287
2287
auto fp = (i) { return 1; }; // error, cannot infer type of `i`
2288
2288
---
2289
2289
2290
- $(H5 $(LNAME2 function-literal-alias, Function Literal Aliasing))
2290
+ $(H4 $(LNAME2 function-literal-alias, Function Literal Aliasing))
2291
2291
2292
- $(P If a function literal is
2293
- $(DDSUBLINK spec/declaration, alias, aliased), the inference
2294
- of the parameter types is done when the types are needed, as
2295
- the function literal becomes a
2296
- $(DDSUBLINK spec/template, function-templates, function template) .)
2292
+ $(P Function literals can be $(DDSUBLINK spec/declaration, alias, aliased).
2293
+ Aliasing a function literal with unspecified parameter types produces a
2294
+ $(DDSUBLINK spec/template, function-template, function template)
2295
+ with type parameters for each unspecified parameter type of the literal.
2296
+ Type inference for the literal is then done when the template is instantiated .)
2297
2297
2298
2298
$(SPEC_RUNNABLE_EXAMPLE_COMPILE
2299
2299
---
0 commit comments