Debian Codegraph @

gcc/testsuite/gdc.test/fail_compilation/ice9284.d

raw
1 /*
2 TEST_OUTPUT:
3 ---
4 fail_compilation/ice9284.d(14): Error: template `__ctor` is not callable using argument types `!()(int)`
5 fail_compilation/ice9284.d(12): Candidate is: `this()(string)`
6 fail_compilation/ice9284.d(20): Error: template instance `ice9284.C.__ctor!()` error instantiating
7 ---
8 */
9
10 class C
11 {
12 this()(string)
13 {
14 this(10);
15 // delegating to a constructor which not exists.
16 }
17 }
18 void main()
19 {
20 new C("hello");
21 }