gcc/testsuite/gdc.test/fail_compilation/ice21095.d
raw| 1 | // https://issues.dlang.org/show_bug.cgi?id=21095 |
| 2 | /* |
| 3 | TEST_OUTPUT: |
| 4 | --- |
| 5 | fail_compilation/ice21095.d(14): Error: constructor `ice21095.Mutex.__ctor!().this` `in` and `out` contracts can only appear without a body when they are virtual interface functions or abstract |
| 6 | fail_compilation/ice21095.d(12): Error: template instance `ice21095.Mutex.__ctor!()` error instantiating |
| 7 | --- |
| 8 | */ |
| 9 | class Mutex |
| 10 | { |
| 11 | this(Object obj) { |
| 12 | this(obj, true); |
| 13 | } |
| 14 | this()(Object, bool) in { } |
| 15 | } |