mirror of
https://github.com/ziglang/zig.git
synced 2024-11-27 07:32:44 +00:00
delete failing recursive test
Don't forget to add these back when solving #12973
This commit is contained in:
parent
7e946bc790
commit
07b6173cb8
@ -1,13 +0,0 @@
|
|||||||
pub fn main() void {
|
|
||||||
const y = fibonacci(7);
|
|
||||||
if (y - 21 != 0) unreachable;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline fn fibonacci(n: usize) usize {
|
|
||||||
if (n <= 2) return n;
|
|
||||||
return fibonacci(n - 2) + fibonacci(n - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// run
|
|
||||||
// target=x86_64-linux,arm-linux,wasm32-wasi
|
|
||||||
//
|
|
@ -1,20 +0,0 @@
|
|||||||
// This additionally tests that the compile error reports the correct source location.
|
|
||||||
// Without storing source locations relative to the owner decl, the compile error
|
|
||||||
// here would be off by 2 bytes (from the "7" -> "999").
|
|
||||||
pub fn main() void {
|
|
||||||
const y = fibonacci(999);
|
|
||||||
if (y - 21 != 0) unreachable;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline fn fibonacci(n: usize) usize {
|
|
||||||
if (n <= 2) return n;
|
|
||||||
return fibonacci(n - 2) + fibonacci(n - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// error
|
|
||||||
//
|
|
||||||
// :11:21: error: evaluation exceeded 1000 backwards branches
|
|
||||||
// :11:21: note: use @setEvalBranchQuota() to raise the branch limit from 1000
|
|
||||||
// :11:40: note: called from here (6 times)
|
|
||||||
// :11:21: note: called from here (495 times)
|
|
||||||
// :5:24: note: called from here
|
|
Loading…
Reference in New Issue
Block a user