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:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user