repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
d: Merge upstream dmd 568496d5b, druntime 178c44ff, phobos 574bf883b.
[official-gcc.git]
/
gcc
/
testsuite
/
gdc.test
/
compilable
/
pr9374.d
blob
912639d40d671475de75760166d11d0bf6209539
1
// REQUIRED_ARGS: -preview=dip1000
2
3
// https://github.com/dlang/dmd/pull/9374
4
5
struct
OnlyResult
6
{
7
this
(
return scope ref int
v2
);
8
9
void
*
data
;
10
}
11
12
OnlyResult
foo
(
return scope ref int
v2
);
13
14
OnlyResult
only
(
int
y
)
15
{
16
if
(
y
)
17
return
OnlyResult
(
y
);
18
return
foo
(
y
);
19
}