mirror of
https://github.com/ziglang/zig.git
synced 2026-02-17 14:59:14 +00:00
Address Spaces: Address space on local variable test
This commit is contained in:
parent
e77fcf1730
commit
6336f08c21
@ -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'",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user