setEvalBranchQuota must be called from top of comptime stack
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user