| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/fail17502.d(13): Error: function `fail17502.Foo.foo` `void` functions have no result |
| 5 |
fail_compilation/fail17502.d(13): Error: undefined identifier `res` |
| 6 |
fail_compilation/fail17502.d(17): Error: function `fail17502.Foo.bar` `void` functions have no result |
| 7 |
fail_compilation/fail17502.d(17): Error: undefined identifier `res` |
| 8 |
--- |
| 9 |
*/ |
| 10 |
class Foo |
| 11 |
{ |
| 12 |
void foo() |
| 13 |
out (res) { assert(res > 5); } |
| 14 |
do {} |
| 15 |
|
| 16 |
auto bar() |
| 17 |
out (res) { assert (res > 5); } |
| 18 |
do { return; } |
| 19 |
} |