[Issue 19097] Extend Return Scope Semantics

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 18 11:06:31 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=19097

--- Comment #5 from Walter Bright <bugzilla at digitalmars.com> ---
(In reply to Mike Franklin from comment #4)
> How does `return` apply to a function that has no `return` type?

If the return type is 'void', and the first parameter is by 'ref', the 'return'
applies to the first parameter. That's the whole thing in one sentence.

(For member functions, the first parameter is the implicit 'this' reference.)

--


More information about the Digitalmars-d-bugs mailing list