d: Merge upstream dmd 568496d5b, druntime 178c44ff, phobos 574bf883b.
[official-gcc.git] / gcc / testsuite / gdc.test / compilable / test19097.d
blob19e189caf5dd5bb9d2116d96b4862c508f3be02c
1 /* REQUIRED_ARGS: -preview=dip1000
2 */
4 // Related to: https://github.com/dlang/dmd/pull/8504
6 @safe:
8 void betty()(ref int* r, return scope int* p)
10 r = p; // infer `scope` for r
13 void boop()(ref int* r, scope int* p)
15 r = p; // infer `scope` for r, `return` for p
18 void foo(scope int* pf)
20 scope int* rf;
21 betty(rf, pf);
22 boop(rf, pf);