[Bug][move-compiler-v2] recursive function type parameter checks are a little too conservative #12607
Labels
bug
Something isn't working
compiler-v2
stale-exempt
Prevents issues from being automatically marked and closed as stale
馃悰 Bug
Following #12360, cyclic instantiation checks are mostly right (so #12072 has been closed) but seem to have one remaining subtle problem.
The first test case in
third_party/move/move-compiler-v2/tests/cyclic-instantiation-checker/v1-tests/complex_1.exp
is not quite correct, as the code shifts type parameters around while traversing a recursive loop, but the types don't grow without bound.Unless I'm wrong, the types go:
so it stabilizes without growing much.
We could modify the error message to be more vague about why we prohibit it or ignore it for now (as obscure), but eventually should probably fix it, but it is probably nontrivial (will require some iteration and/or reasoning about the recursive type expression).
The text was updated successfully, but these errors were encountered: