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