aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/4-statements/decl_void_variable.zc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/conformance/4-statements/decl_void_variable.zc')
-rw-r--r--tests/conformance/4-statements/decl_void_variable.zc5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/conformance/4-statements/decl_void_variable.zc b/tests/conformance/4-statements/decl_void_variable.zc
new file mode 100644
index 0000000..c9a8d85
--- /dev/null
+++ b/tests/conformance/4-statements/decl_void_variable.zc
@@ -0,0 +1,5 @@
+// expect error: a variable can't be void
+// spec 4.1.7
+include rt;
+void pn(int x) { rt.put_n(x); rt.put_c(10); }
+fn main() { void v = 0; return 0; }