Maybe another strategy is to use Core.Compiler.return_type or Test.@inferred to warn or disallow the user from introducing these type instabilities at all. Would lead them to correcting internal instabilities which presumably would make the code even faster than just annotating the return type for them, although would be more work on their end, so certainly a tradeoff.
1 Like