aboutsummaryrefslogtreecommitdiff
path: root/tests/errors/branch_mismatch.zc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/errors/branch_mismatch.zc')
-rw-r--r--tests/errors/branch_mismatch.zc3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/errors/branch_mismatch.zc b/tests/errors/branch_mismatch.zc
new file mode 100644
index 0000000..bd19968
--- /dev/null
+++ b/tests/errors/branch_mismatch.zc
@@ -0,0 +1,3 @@
+// expect: x: ends the branches of an if in different states
+fn take(.d p) { return p[0]; }
+fn main() { let x = new(1); if (x[0]) take(d*x); else u*x; return 0; }