| ... | ... | @@ -1,20 +0,0 @@ |
| 1 | | // This additionally tests that the compile error reports the correct source location. |
| 2 | | // Without storing source locations relative to the owner decl, the compile error |
| 3 | | // here would be off by 2 bytes (from the "7" -> "999"). |
| 4 | | pub fn main() void { |
| 5 | | const y = fibonacci(999); |
| 6 | | if (y - 21 != 0) unreachable; |
| 7 | | } |
| 8 | | |
| 9 | | inline fn fibonacci(n: usize) usize { |
| 10 | | if (n <= 2) return n; |
| 11 | | return fibonacci(n - 2) + fibonacci(n - 1); |
| 12 | | } |
| 13 | | |
| 14 | | // error |
| 15 | | // |
| 16 | | // :11:21: error: evaluation exceeded 1000 backwards branches |
| 17 | | // :11:21: note: use @setEvalBranchQuota() to raise the branch limit from 1000 |
| 18 | | // :11:40: note: called from here (6 times) |
| 19 | | // :11:21: note: called from here (495 times) |
| 20 | | // :5:24: note: called from here |