# Need help with incomprehensible typeinference

**URL:** <https://discourse.julialang.org/t/need-help-with-incomprehensible-typeinference/81056>\
**Category:** Performance\
**Tags:** question\
**Created:** [May 14, 2022, 11:15am UTC](https://discourse.julialang.org/t/need-help-with-incomprehensible-typeinference/81056 "2022-05-14T11:15:25Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Benny](https://avatars.discourse-cdn.com/v4/letter/b/49beb7/32.png) [@Benny](https://discourse.julialang.org/u/Benny)\
**Post date:** [May 14, 2022, 9:55pm UTC](https://discourse.julialang.org/t/need-help-with-incomprehensible-typeinference/81056/7 "2022-05-14T21:55:23Z")

</div>

> [@mkitti](#):
>
> it appears that the inference engine is inconsistent.

Reminiscent of [this thread](https://discourse.julialang.org/t/why-is-this-expression-type-unstable/80648), where I’ve just now also confirmed the effect where redefining a callee function causes the caller function to be inferred as type-unstable again. `Test.@inferred` is actually trickier than `@code_warntype` in that thread’s example, the order of running+compiling the callee and caller methods affects whether `@inferred` gets “stuck” reporting an instability, and the trick of redefining a method to “undo” its compilation can be used to fix that compilation order and make `@inferred` work.

---

_[View the full topic](https://discourse.julialang.org/t/need-help-with-incomprehensible-typeinference/81056)._
