diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2015-12-15 19:17:39 -0700 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2015-12-15 19:17:39 -0700 |
| commit | 5a8822c714e4ee2d442e76f36213d119530f0fea (patch) | |
| tree | 45c71c52e8f7304efc2f32cda40b3983d8b76e5e /test/run_tests.cpp | |
| parent | 28c5a8f2cab193858717594fc91df3369980e18c (diff) | |
| download | zig-5a8822c714e4ee2d442e76f36213d119530f0fea.tar.gz zig-5a8822c714e4ee2d442e76f36213d119530f0fea.zip | |
fix assignment operators for struct fields
Diffstat (limited to 'test/run_tests.cpp')
| -rw-r--r-- | test/run_tests.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/run_tests.cpp b/test/run_tests.cpp index b13ad98999..e7729e5a42 100644 --- a/test/run_tests.cpp +++ b/test/run_tests.cpp @@ -566,7 +566,7 @@ use "std.zig"; export fn main(argc : isize, argv : &&u8, env : &&u8) -> i32 { var foo : Foo; - foo.a = foo.a + 1; + foo.a += 1; foo.b = foo.a == 1; test_foo(foo); return 0; @@ -749,7 +749,7 @@ fn f() { const a = 3; a = 4; } - )SOURCE", 1, ".tmp_source.zig:4:5: error: cannot assign to constant variable"); + )SOURCE", 1, ".tmp_source.zig:4:5: error: cannot assign to constant"); add_compile_fail_case("use of undeclared identifier", R"SOURCE( fn f() { @@ -787,7 +787,7 @@ const x : i32 = 99; fn f() { x = 1; } - )SOURCE", 1, ".tmp_source.zig:4:5: error: cannot assign to constant variable"); + )SOURCE", 1, ".tmp_source.zig:4:5: error: cannot assign to constant"); add_compile_fail_case("missing else clause", R"SOURCE( |
