diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-02-14 10:51:59 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-02-14 10:51:59 -0500 |
| commit | c58b80203443dcbf8b737ebdaa1f17fb20c77711 (patch) | |
| tree | b1e9af991951c68e1fa7042b2f75091a61c0c8cf /test/compile_errors.zig | |
| parent | a4e32d9fb143dbfb622a5097ea4a1e4bcad03463 (diff) | |
| download | zig-c58b80203443dcbf8b737ebdaa1f17fb20c77711.tar.gz zig-c58b80203443dcbf8b737ebdaa1f17fb20c77711.zip | |
remove the "top of the comptime stack" compile error
It's still best practice to put `@setEvalBranchQuota` at the top of
the comptime stack, but as Jimmi notes in #1949, when a function
can be called at comptime and also can be the top of the comptime stack,
this compile error is fundamentally unsound.
So now it's gone.
closes #1949
Diffstat (limited to 'test/compile_errors.zig')
| -rw-r--r-- | test/compile_errors.zig | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig index b895e2c2d1..6a2ded1844 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig @@ -4555,20 +4555,6 @@ pub fn addCases(cases: *tests.CompileErrorContext) void { ); cases.add( - "@setEvalBranchQuota in non-root comptime execution context", - \\comptime { - \\ foo(); - \\} - \\fn foo() void { - \\ @setEvalBranchQuota(1001); - \\} - , - ".tmp_source.zig:5:5: error: @setEvalBranchQuota must be called from the top of the comptime stack", - ".tmp_source.zig:2:8: note: called from here", - ".tmp_source.zig:1:10: note: called from here", - ); - - cases.add( "wrong pointer implicitly casted to pointer to @OpaqueType()", \\const Derp = @OpaqueType(); \\extern fn bar(d: *Derp) void; |
