mirror of
https://github.com/roc-lang/roc.git
synced 2024-09-21 15:59:20 +03:00
0a807dc43e
This patch provides errors for defs that are used only in possibly-mutual recursion, and are not reachable outside of their recursive closures. For example: ``` test_report!( mutual_recursion_not_reached_nested, indoc!( r#" app "test" provides [main] to "./platform" main = f = \{} -> if Bool.true then "" else g {} g = \{} -> if Bool.true then "" else f {} "" "# ), @r###" ── DEFINITIONs ONLY USED IN RECURSION ──────────────────── /code/proj/Main.roc ─ These 2 definitions are only used in mutual recursion with themselves: 4│> f = \{} -> if Bool.true then "" else g {} 5│> g = \{} -> if Bool.true then "" else f {} If you don't intend to use or export any of them, they should all be removed! "### ); ``` |
||
---|---|---|
.. | ||
src | ||
tests | ||
.gitignore | ||
Cargo.toml |