diff options
| author | Veikka Tuominen <git@vexu.eu> | 2022-06-27 18:32:59 +0300 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2022-06-30 09:57:38 +0200 |
| commit | 3204d00a5e7fe119b690e921138a439fb84dff5b (patch) | |
| tree | 40dba7f0816a1a8cae35657aa0d6bcb0ec19b6ba /test/cases/compile_errors/write_to_const_global_variable.zig | |
| parent | c248af3bdcd17c334e742d53a7ac7bda2422a688 (diff) | |
| download | zig-3204d00a5e7fe119b690e921138a439fb84dff5b.tar.gz zig-3204d00a5e7fe119b690e921138a439fb84dff5b.zip | |
move passing stage1 compile error tests to stage2
Diffstat (limited to 'test/cases/compile_errors/write_to_const_global_variable.zig')
| -rw-r--r-- | test/cases/compile_errors/write_to_const_global_variable.zig | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/cases/compile_errors/write_to_const_global_variable.zig b/test/cases/compile_errors/write_to_const_global_variable.zig new file mode 100644 index 0000000000..eaa9353f00 --- /dev/null +++ b/test/cases/compile_errors/write_to_const_global_variable.zig @@ -0,0 +1,11 @@ +const x : i32 = 99; +fn f() void { + x = 1; +} +export fn entry() void { f(); } + +// error +// backend=stage2 +// target=native +// +// :3:9: error: cannot assign to constant |
