Skip to content

Commit

Permalink
Merge pull request #2535 from WalterBright/fix19097-1
Browse files Browse the repository at this point in the history
add initial documentation for issue 19097
merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
  • Loading branch information
dlang-bot committed Dec 30, 2018
2 parents 3b497da + 6299e91 commit 140267d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/function.dd
Expand Up @@ -1394,6 +1394,12 @@ int* mars(return ref int i)
}
---

$(P If the function returns `void`, and the first parameter is `ref` or `out`, then
all subsequent `return ref` parameters are considered as being assigned to
the first parameter for lifetime checking.
The `this` reference parameter to a struct non-static member function is
considered the first parameter.)

$(P If there are multiple `return ref` parameters, the lifetime of the return
value is the smallest lifetime of the corresponding arguments.)

Expand Down

0 comments on commit 140267d

Please sign in to comment.