Repository navigation
Commit ec56ea8
committed
test: cover the return-type walk past the old stack cap
The first commit converted three walks in ts_lsp.c but tested only two of
them. infer_return_type_from_body was changed without a test of its own.
tslsp_stress_return_past_stack_cap makes the same claim as the existing
tslsp_return_inferred_local, with the return placed after 300 statements
— more than the 256 slots the old fixed array held, so the walk used to
stop before reaching it and answer "unknown return type".
Without the fix the suite is 303 passed, 2 failed, the second failure
being this test. With it, 305 passed.
Signed-off-by: Joshua Richter <jrichter5781@gmail.com>1 parent b974adf commit ec56ea8
1 file changed
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2846 | 2846 | | |
2847 | 2847 | | |
2848 | 2848 | | |
| 2849 | + | |
| 2850 | + | |
| 2851 | + | |
| 2852 | + | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
| 2858 | + | |
| 2859 | + | |
| 2860 | + | |
| 2861 | + | |
| 2862 | + | |
| 2863 | + | |
| 2864 | + | |
| 2865 | + | |
| 2866 | + | |
| 2867 | + | |
| 2868 | + | |
| 2869 | + | |
| 2870 | + | |
| 2871 | + | |
| 2872 | + | |
| 2873 | + | |
| 2874 | + | |
| 2875 | + | |
| 2876 | + | |
| 2877 | + | |
2849 | 2878 | | |
2850 | 2879 | | |
2851 | 2880 | | |
| |||
4595 | 4624 | | |
4596 | 4625 | | |
4597 | 4626 | | |
| 4627 | + | |
4598 | 4628 | | |
4599 | 4629 | | |
4600 | 4630 | | |
| |||
0 commit comments