The result of that is a cyclical graph where nodes are traversed several times over per pass, for several passes, with increasingly more information until it reaches a state where all callers have been accounted for.
Thanks for both of your replies.
The last paragraph of your reply above reminds me somewhat of a part of this talk, somewhere near the end:
Lang NEXT 2014 Panel Systems Programming in 2014 and Beyond
https://youtu.be/ZQR32nTVF_4?si=zQNTWBXcp4TkSnRh
It is the part where Bjarne Stroustrup talks about the issue of the huge compilation times of multi-file C++ projects, due to the number of times that header files are repeatedly included, IIRC. The section is a bit funny, with the responses from the other participants.
There may be a solution for by now (modules), but I am not a C++ guy, so don't know if it exists or is good enough.
Interested to know what others think of this.
Is this an issue of type inference in general (and therefore exists in all languages that do type inference), or is it related of Crystal's implementation of type inference?