edit: no longer up-to date. the current plan is to add the explicitly add the source type to MIR casts instead
We should add a MIR pass after analysis (and before any optimizations) which makes subtyping explicit in the MIR. This is a robust way to fix #107205, preventing similar issues in the future. I don't quite know how to do that, probably by adding an explicit ProjectionElem::Cast (probably reusing OpaqueCast for that).
edit: no longer up-to date. the current plan is to add the explicitly add the source type to MIR casts instead
We should add a MIR pass after analysis (and before any optimizations) which makes subtyping explicit in the MIR. This is a robust way to fix #107205, preventing similar issues in the future. I don't quite know how to do that, probably by adding an explicit
ProjectionElem::Cast(probably reusingOpaqueCastfor that).