diff options
Diffstat (limited to 'gcc/testsuite/gdc.test/fail_compilation/fail14997.d')
-rw-r--r-- | gcc/testsuite/gdc.test/fail_compilation/fail14997.d | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail14997.d b/gcc/testsuite/gdc.test/fail_compilation/fail14997.d new file mode 100644 index 00000000000..3654f041429 --- /dev/null +++ b/gcc/testsuite/gdc.test/fail_compilation/fail14997.d @@ -0,0 +1,20 @@ +// https://issues.dlang.org/show_bug.cgi?id=14997 + +/* +TEST_OUTPUT: +--- +fail_compilation/fail14997.d(19): Error: none of the overloads of `this` are callable using argument types `()` +fail_compilation/fail14997.d(14): Candidates are: `fail14997.Foo.this(int a)` +fail_compilation/fail14997.d(15): `fail14997.Foo.this(string a)` +--- +*/ + +class Foo +{ + this (int a) {} + this (string a) {} +} +void main() +{ + auto a = new Foo; +} |