| author | |
| committer | |
| log | b12a5cea7559c4cd4666f142b3e05265b07fe323 |
| tree | b316af3dbfb6a4e5ff732a46d732ab8b81b6c8b5 |
| parent | db799ae628cc3a131c34f8ae4b7422d7e9520cff |
This test should be restored once the underlying issue is resolved (with the typo fixed).2 files changed, 1 insertions(+), 30 deletions(-)
src/Module.zig+1| ... | @@ -3489,6 +3489,7 @@ pub fn destroyDecl(mod: *Module, decl_index: Decl.Index) void { | ... | @@ -3489,6 +3489,7 @@ pub fn destroyDecl(mod: *Module, decl_index: Decl.Index) void { |
| 3489 | const errs = mod.comp.getAllErrorsAlloc() catch break :blk; | 3489 | const errs = mod.comp.getAllErrorsAlloc() catch break :blk; |
| 3490 | for (errs.list) |err| Compilation.AllErrors.Message.renderToStdErr(err, .no_color); | 3490 | for (errs.list) |err| Compilation.AllErrors.Message.renderToStdErr(err, .no_color); |
| 3491 | } | 3491 | } |
| 3492 | // TODO restore test case triggering this panic | ||
| 3492 | @panic("Zig compiler bug: attempted to destroy declaration with an attached error"); | 3493 | @panic("Zig compiler bug: attempted to destroy declaration with an attached error"); |
| 3493 | } | 3494 | } |
| 3494 | const decl = mod.declPtr(decl_index); | 3495 | const decl = mod.declPtr(decl_index); |
test/cases/compile_errors/generic_funciton_instantiation_inherits_parent_branch_quota.zig deleted-30| ... | @@ -1,30 +0,0 @@ | ||
| 1 | pub export fn entry1() void { | ||
| 2 | @setEvalBranchQuota(1001); | ||
| 3 | // Return type evaluation should inherit both the | ||
| 4 | // parent's branch quota and count meaning | ||
| 5 | // at least 2002 backwards branches are required. | ||
| 6 | comptime var i = 0; | ||
| 7 | inline while (i < 1000) : (i += 1) {} | ||
| 8 | _ = simple(10); | ||
| 9 | } | ||
| 10 | pub export fn entry2() void { | ||
| 11 | @setEvalBranchQuota(2001); | ||
| 12 | comptime var i = 0; | ||
| 13 | inline while (i < 1000) : (i += 1) {} | ||
| 14 | _ = simple(10); | ||
| 15 | } | ||
| 16 | fn simple(comptime n: usize) Type(n) { | ||
| 17 | return n; | ||
| 18 | } | ||
| 19 | fn Type(comptime n: usize) type { | ||
| 20 | if (n <= 1) return usize; | ||
| 21 | return Type(n - 1); | ||
| 22 | } | ||
| 23 | |||
| 24 | // error | ||
| 25 | // backend=stage2 | ||
| 26 | // target=native | ||
| 27 | // | ||
| 28 | // :21:16: error: evaluation exceeded 1001 backwards branches | ||
| 29 | // :21:16: note: use @setEvalBranchQuota() to raise the branch limit from 1001 | ||
| 30 | // :16:34: note: called from here | ||