diff --git a/spec/function.dd b/spec/function.dd index 80ef1dffd3..08e51599cd 100644 --- a/spec/function.dd +++ b/spec/function.dd @@ -1188,6 +1188,12 @@ int foo(in int x, out int y, ref int z, int q); $(TROW $(D scope), references in the parameter cannot be escaped (e.g. assigned to a global variable). Ignored for parameters with no references) + $(TROW $(D return), Parameter may be returned or copied to the first parameter, + $(TROW $(D const), argument is implicitly converted to a const type) + but otherwise does not escape from the function. + Such copies are required not to outlive the argument(s) they were derived from. + Ignored for parameters with no references. + See $(DDSUBLINK memory-safe-d, scope-params, Scope Parameters).) $(TROW $(D lazy), argument is evaluated by the called function and not by the caller) $(TROW $(D const), argument is implicitly converted to a const type) $(TROW $(D immutable), argument is implicitly converted to an immutable type)