mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
Address Spaces: Address space on local variable test
This commit is contained in:
@@ -1807,4 +1807,16 @@ pub fn addCases(ctx: *TestContext) !void {
|
||||
\\}
|
||||
, "");
|
||||
}
|
||||
|
||||
{
|
||||
var case = ctx.exe("setting an address space on a local variable", linux_x64);
|
||||
case.addError(
|
||||
\\export fn entry() i32 {
|
||||
\\ var foo: i32 addrspace(".general") = 1234;
|
||||
\\ return foo;
|
||||
\\}
|
||||
, &[_][]const u8{
|
||||
":2:28: error: cannot set address space of local variable 'foo'",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user