diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2017-08-31 16:54:20 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2017-08-31 16:54:20 -0400 |
| commit | c42e809f132d91fca1f96da2ecff7d78e1085c3f (patch) | |
| tree | cebe89ba65d63fa5518a08977725553a0b374b8c /test/compile_errors.zig | |
| parent | 67b6dd28ec70937a29176719b56457ee17b1c136 (diff) | |
| download | zig-c42e809f132d91fca1f96da2ecff7d78e1085c3f.tar.gz zig-c42e809f132d91fca1f96da2ecff7d78e1085c3f.zip | |
setEvalBranchQuota must be called from top of comptime stack
Diffstat (limited to 'test/compile_errors.zig')
| -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"); } |
