aboutsummaryrefslogtreecommitdiff
path: root/test/compile_errors.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-11-17 01:38:35 -0500
committerAndrew Kelley <superjoe30@gmail.com>2018-11-17 01:38:35 -0500
commit704374e51294e14285b0b54030c1cb6154868098 (patch)
treea0e33d754ab4b5fe84961a48711cdeff23dc858b /test/compile_errors.zig
parent38629628814aae6ba09bc2c25fdbac407a5d9e17 (diff)
downloadzig-704374e51294e14285b0b54030c1cb6154868098.tar.gz
zig-704374e51294e14285b0b54030c1cb6154868098.zip
rename `section` keyword to `linksection`
add zig fmt support for this syntax closes #1152
Diffstat (limited to 'test/compile_errors.zig')
-rw-r--r--test/compile_errors.zig12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig
index 22be733d17..7339be7fad 100644
--- a/test/compile_errors.zig
+++ b/test/compile_errors.zig
@@ -3867,32 +3867,32 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {
cases.add(
"setting a section on an extern variable",
- \\extern var foo: i32 section(".text2");
+ \\extern var foo: i32 linksection(".text2");
\\export fn entry() i32 {
\\ return foo;
\\}
,
- ".tmp_source.zig:1:29: error: cannot set section of external variable 'foo'",
+ ".tmp_source.zig:1:33: error: cannot set section of external variable 'foo'",
);
cases.add(
"setting a section on a local variable",
\\export fn entry() i32 {
- \\ var foo: i32 section(".text2") = 1234;
+ \\ var foo: i32 linksection(".text2") = 1234;
\\ return foo;
\\}
,
- ".tmp_source.zig:2:26: error: cannot set section of local variable 'foo'",
+ ".tmp_source.zig:2:30: error: cannot set section of local variable 'foo'",
);
cases.add(
"setting a section on an extern fn",
- \\extern fn foo() section(".text2") void;
+ \\extern fn foo() linksection(".text2") void;
\\export fn entry() void {
\\ foo();
\\}
,
- ".tmp_source.zig:1:25: error: cannot set section of external function 'foo'",
+ ".tmp_source.zig:1:29: error: cannot set section of external function 'foo'",
);
cases.add(