Debian Codegraph @

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

raw
1 // https://issues.dlang.org/show_bug.cgi?id=14997
2
3 /*
4 TEST_OUTPUT:
5 ---
6 fail_compilation/fail14997.d(19): Error: none of the overloads of `this` are callable using argument types `()`
7 fail_compilation/fail14997.d(14): Candidates are: `fail14997.Foo.this(int a)`
8 fail_compilation/fail14997.d(15): `fail14997.Foo.this(string a)`
9 ---
10 */
11
12 class Foo
13 {
14 this (int a) {}
15 this (string a) {}
16 }
17 void main()
18 {
19 auto a = new Foo;
20 }