move array and struct const checks to more appropriate places

This commit is contained in:
Vexu
2020-04-08 14:20:05 +03:00
parent ff0f97a1bc
commit b1e44adcba
2 changed files with 15 additions and 16 deletions

View File

@@ -10,7 +10,7 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {
\\ reassign(.{1, 2, 3});
\\}
, &[_][]const u8{
"tmp.zig:2:16: error: cannot assign to constant"
"tmp.zig:2:15: error: cannot assign to constant"
});
cases.addTest("reassign to slice parameter",
@@ -35,7 +35,7 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {
\\ reassign(S{.x = 3});
\\}
, &[_][]const u8{
"tmp.zig:5:16: error: cannot assign to constant"
"tmp.zig:5:10: error: cannot assign to constant"
});
cases.addTest("reference to const data",