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

--- Comment #13 from Mike Franklin <slavo5...@yahoo.com> ---
For constructors, one could use `return(this)` to the same effect. Perhaps for
constructors, if there are no other "output" parameters in the signature,
`return(this)` could be inferred by simply typing add `return` to the input
parameters.  If there is more than one "output" parameter, the user would have
to explicitly disambiguate by adding an argument to the `return` attribute.

struct S
{
    // does `return` apply to `this` or `r`?
    this(ref scope int* r, return scope int* p);

    // disambiguate by explicitly adding an argument to `return`
    this(ref scope int* r, return(this) scope int* p);
    // or
    this(ref scope int* r, return(r) scope int* p);
}

--

Reply via email to