I thought about this some more, I’m not sure any solution would be as simple as bumping the visit limit, so I think we should go with the fix Zhi already has.
@masahi @mbrookhart Sorry for the late response because it is a holiday.
@mbrookhart thanks for looking deep. You are absolutely right that the way we currently have was to simplify context analysis/unification for high order functions. I think we need to enhance it though a mechanism that solves the context information of them. Therefore, we don’t have to lazily propagate it and revisit these functions multiple times.
I tried to set the limit to 9 but it seemed still not working (I didn’t look into why), but 19 worked. May be we can bump it to 19 and reset it back to 1 when we have a more powerful way to unify the high order functions?
Sounds great, thanks @zhiics!