gcc/testsuite/gdc.test/fail_compilation/short_fn.d
raw| 1 | /* |
| 2 | TEST_OUTPUT: |
| 3 | --- |
| 4 | fail_compilation/short_fn.d(13): Error: can only return void expression, `this` call or `super` call from constructor |
| 5 | fail_compilation/short_fn.d(14): Error: can only return void expression, `this` call or `super` call from constructor |
| 6 | --- |
| 7 | */ |
| 8 | |
| 9 | struct Number |
| 10 | { |
| 11 | int x; |
| 12 | |
| 13 | this(int x) => this.x = x; |
| 14 | this(byte x) => Number(); |
| 15 | } |