mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 04:48:20 +00:00
remove test case triggering generic deletion bug
This test should be restored once the underlying issue is resolved (with the typo fixed).
This commit is contained in:
parent
db799ae628
commit
b12a5cea75
@ -3489,6 +3489,7 @@ pub fn destroyDecl(mod: *Module, decl_index: Decl.Index) void {
|
||||
const errs = mod.comp.getAllErrorsAlloc() catch break :blk;
|
||||
for (errs.list) |err| Compilation.AllErrors.Message.renderToStdErr(err, .no_color);
|
||||
}
|
||||
// TODO restore test case triggering this panic
|
||||
@panic("Zig compiler bug: attempted to destroy declaration with an attached error");
|
||||
}
|
||||
const decl = mod.declPtr(decl_index);
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
pub export fn entry1() void {
|
||||
@setEvalBranchQuota(1001);
|
||||
// Return type evaluation should inherit both the
|
||||
// parent's branch quota and count meaning
|
||||
// at least 2002 backwards branches are required.
|
||||
comptime var i = 0;
|
||||
inline while (i < 1000) : (i += 1) {}
|
||||
_ = simple(10);
|
||||
}
|
||||
pub export fn entry2() void {
|
||||
@setEvalBranchQuota(2001);
|
||||
comptime var i = 0;
|
||||
inline while (i < 1000) : (i += 1) {}
|
||||
_ = simple(10);
|
||||
}
|
||||
fn simple(comptime n: usize) Type(n) {
|
||||
return n;
|
||||
}
|
||||
fn Type(comptime n: usize) type {
|
||||
if (n <= 1) return usize;
|
||||
return Type(n - 1);
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :21:16: error: evaluation exceeded 1001 backwards branches
|
||||
// :21:16: note: use @setEvalBranchQuota() to raise the branch limit from 1001
|
||||
// :16:34: note: called from here
|
||||
Loading…
x
Reference in New Issue
Block a user