| 1 |
// https://issues.dlang.org/show_bug.cgi?id=22054 |
| 2 |
|
| 3 |
/* |
| 4 |
TEST_OUTPUT: |
| 5 |
--- |
| 6 |
fail_compilation/fail22054.d(21): Error: no property `what` for type `fail22054.exception` |
| 7 |
fail_compilation/fail22054.d(16): `class fail22054.exception` is opaque and has no members. |
| 8 |
fail_compilation/fail22054.d(22): Error: no property `what` for type `fail22054.exception2` |
| 9 |
fail_compilation/fail22054.d(17): `struct fail22054.exception2` is opaque and has no members. |
| 10 |
--- |
| 11 |
*/ |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
class exception; |
| 17 |
struct exception2; |
| 18 |
|
| 19 |
void main () |
| 20 |
{ |
| 21 |
assert(exception.what() == "Hello"); |
| 22 |
assert(exception2.what() == "Hello"); |
| 23 |
} |