summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/fail_compilation/fail22054.d
blob: c172f089d9c7abf2aaabb1b0af631ee053e02991 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// https://issues.dlang.org/show_bug.cgi?id=22054

/*
TEST_OUTPUT:
---
fail_compilation/fail22054.d(21): Error: no property `what` for type `fail22054.exception`
fail_compilation/fail22054.d(16):        `class fail22054.exception` is opaque and has no members.
fail_compilation/fail22054.d(22): Error: no property `what` for type `fail22054.exception2`
fail_compilation/fail22054.d(17):        `struct fail22054.exception2` is opaque and has no members.
---
*/




class exception;
struct exception2;

void main ()
{
    assert(exception.what() == "Hello");
    assert(exception2.what() == "Hello");
}