Skip to content

Commit 140267d

Browse files
authored
Merge pull request #2535 from WalterBright/fix19097-1
add initial documentation for issue 19097 merged-on-behalf-of: Nicholas Wilson <thewilsonator@users.noreply.github.com>
2 parents 3b497da + 6299e91 commit 140267d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

spec/function.dd

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,6 +1394,12 @@ int* mars(return ref int i)
13941394
}
13951395
---
13961396

1397+
$(P If the function returns `void`, and the first parameter is `ref` or `out`, then
1398+
all subsequent `return ref` parameters are considered as being assigned to
1399+
the first parameter for lifetime checking.
1400+
The `this` reference parameter to a struct non-static member function is
1401+
considered the first parameter.)
1402+
13971403
$(P If there are multiple `return ref` parameters, the lifetime of the return
13981404
value is the smallest lifetime of the corresponding arguments.)
13991405

0 commit comments

Comments
 (0)