allow calling with a new stack to regress a bit

Calling with a new stack, with a runtime-known stack pointer (e.g.
not a global variable) is regressed with this branch. It is now a
compile-error, due to the Runtime Hint system not being smart enough
to mix a compile-time modifier field with a runtime stack field.
I'm OK with this regression because this feature is flawed (see #3268)
and may be deleted from the language.
This commit is contained in:
Andrew Kelley
2019-12-06 15:25:00 -05:00
parent 71b7f4b47f
commit 656cc33f8d
4 changed files with 16 additions and 27 deletions

View File

@@ -45,9 +45,9 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {
cases.addCase(x: {
var tc = cases.create("call with new stack on unsupported target",
\\var buf: [10]u8 align(16) = undefined;
\\export fn entry() void {
\\ var buf: [10]u8 align(16) = undefined;
\\ @call(.{.stack = &buf}, foo);
\\ @call(.{.stack = &buf}, foo, .{});
\\}
\\fn foo() void {}
, "tmp.zig:3:5: error: target arch 'wasm32' does not support calling with a new stack");