Type stability bug in compiler?

without MWE it’s impossible to help