summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/fail_compilation/fail7443.d
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gdc.test/fail_compilation/fail7443.d')
-rw-r--r--gcc/testsuite/gdc.test/fail_compilation/fail7443.d14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/fail_compilation/fail7443.d b/gcc/testsuite/gdc.test/fail_compilation/fail7443.d
new file mode 100644
index 00000000000..2c5c9400746
--- /dev/null
+++ b/gcc/testsuite/gdc.test/fail_compilation/fail7443.d
@@ -0,0 +1,14 @@
+/*
+TEST_OUTPUT:
+---
+fail_compilation/fail7443.d(11): Error: `static` has no effect on a constructor inside a `static` block. Use `static this()`
+fail_compilation/fail7443.d(12): Error: `shared static` has no effect on a constructor inside a `shared static` block. Use `shared static this()`
+---
+*/
+
+class Foo
+{
+ public static { this() {}}
+ public shared static { this() {}}
+ public {this(int) {}}
+}