]>
Commit | Line | Data |
---|---|---|
b4c522fa IB |
1 | /* TEST_OUTPUT: |
2 | --- | |
5fee5ec3 | 3 | fail_compilation/test15191.d(17): Error: cannot take address of `ref return` of `foo()` in `@safe` function `bar` |
b4c522fa IB |
4 | --- |
5 | */ | |
6 | ||
7 | ||
8 | // https://issues.dlang.org/show_bug.cgi?id=15191 | |
9 | ||
10 | ref int foo(return ref int s)@safe | |
11 | { | |
12 | return s; | |
13 | } | |
14 | ||
15 | int* bar(return ref int s) @safe | |
16 | { | |
17 | return &foo(s); | |
18 | } |