aboutsummaryrefslogtreecommitdiff
path: root/tests/conformance/3-expressions/assign_to_non_lvalue.zc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/conformance/3-expressions/assign_to_non_lvalue.zc')
-rw-r--r--tests/conformance/3-expressions/assign_to_non_lvalue.zc7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/conformance/3-expressions/assign_to_non_lvalue.zc b/tests/conformance/3-expressions/assign_to_non_lvalue.zc
new file mode 100644
index 0000000..7436a12
--- /dev/null
+++ b/tests/conformance/3-expressions/assign_to_non_lvalue.zc
@@ -0,0 +1,7 @@
+// expect error: this can't be assigned to
+include rt;
+fn main() {
+ int a = 1;
+ (a + 1) = 5;
+ return 0;
+}