OK I think I have figured this out ...
It seems this is the limitation of our editor. The type inferring engine can track up to 62 various types within a routine (global scope of a file, function, method, lambda). Once there's more than that, any new type just falls back to mixed
.
So if you have a large file with variables that have lots of distinct types, it may end up "dumb".