mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00
19 lines
512 B
D
19 lines
512 B
D
/*
|
|
TEST_OUTPUT:
|
|
---
|
|
fail_compilation/fail17502.d(13): Error: function `fail17502.Foo.foo` `void` functions have no result
|
|
fail_compilation/fail17502.d(13): Error: undefined identifier `res`
|
|
fail_compilation/fail17502.d(17): Error: function `fail17502.Foo.bar` `void` functions have no result
|
|
fail_compilation/fail17502.d(17): Error: undefined identifier `res`
|
|
---
|
|
*/
|
|
class Foo
|
|
{
|
|
void foo()
|
|
out (res) { assert(res > 5); }
|
|
do {}
|
|
|
|
auto bar()
|
|
out (res) { assert (res > 5); }
|
|
do { return; }
|
|
}
|