summaryrefslogtreecommitdiffstats
path: root/tests/new/InterfaceConstructor.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/new/InterfaceConstructor.java')
-rw-r--r--tests/new/InterfaceConstructor.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/new/InterfaceConstructor.java b/tests/new/InterfaceConstructor.java
new file mode 100644
index 000000000..080e4406b
--- /dev/null
+++ b/tests/new/InterfaceConstructor.java
@@ -0,0 +1,9 @@
+interface i {
+ i() {} // ERR: interfaces can't have constructors
+}
+
+class c {
+ c(); //ERR: constructors must have bodies
+
+ abstract c(int i) { } //ERR: constructors can't be abstract
+}