blob: 19e189caf5dd5bb9d2116d96b4862c508f3be02c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/* REQUIRED_ARGS: -preview=dip1000
*/
// Related to: https://github.com/dlang/dmd/pull/8504
@safe:
void betty()(ref int* r, return scope int* p)
{
r = p; // infer `scope` for r
}
void boop()(ref int* r, scope int* p)
{
r = p; // infer `scope` for r, `return` for p
}
void foo(scope int* pf)
{
scope int* rf;
betty(rf, pf);
boop(rf, pf);
}
|