gcc/testsuite/gdc.test/compilable/imports/testcontracts.d
raw| 1 | module imports.testcontracts; |
| 2 | |
| 3 | /***************************************************/ |
| 4 | // https://issues.dlang.org/show_bug.cgi?id=3602 |
| 5 | |
| 6 | class Base3602 |
| 7 | { |
| 8 | void method(int x, int y) |
| 9 | in |
| 10 | { |
| 11 | assert(x > 0); |
| 12 | assert(y > 0); |
| 13 | } |
| 14 | do |
| 15 | { |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | /***************************************************/ |
| 20 | // https://issues.dlang.org/show_bug.cgi?id=5230 |
| 21 | |
| 22 | class Base5230 |
| 23 | { |
| 24 | int method() |
| 25 | out (res) |
| 26 | { |
| 27 | } |
| 28 | do |
| 29 | { |
| 30 | return 42; |
| 31 | } |
| 32 | } |