diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/compile_errors.zig | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/compile_errors.zig b/test/compile_errors.zig index 81d1361aec..2ab26c0078 100644 --- a/test/compile_errors.zig +++ b/test/compile_errors.zig @@ -2068,4 +2068,15 @@ pub fn addCases(cases: &tests.CompileErrorContext) { , ".tmp_source.zig:2:24: error: expected [2]u8 literal, found [3]u8 literal"); + cases.add("@setEvalBranchQuota in non-root comptime execution context", + \\comptime { + \\ foo(); + \\} + \\fn foo() { + \\ @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"); } |
