diff options
Diffstat (limited to 'tests/langerrors/const_local_write.zc')
| -rw-r--r-- | tests/langerrors/const_local_write.zc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/langerrors/const_local_write.zc b/tests/langerrors/const_local_write.zc new file mode 100644 index 0000000..31220be --- /dev/null +++ b/tests/langerrors/const_local_write.zc @@ -0,0 +1,9 @@ +namespace; +include rt; + +// expect: const storage cannot be modified +fn main() { + const k = 5; + k = 6; + rt.put_n(k); +} |
