julia
3add4cd3 - lattice: Don't short-circuit layers between PartialStruct and Type (#47988)

Commit
3 years ago
lattice: Don't short-circuit layers between PartialStruct and Type (#47988) This catches a corner case I missed in #46881. In particular, when both arguments are `Const`, it is legal for intermediate lattice layers between the PartialsLattice and the ConstLattice to do something other than give the merged type. The current code in the PartialsLattice was short-circuiting this, leading to inference imprecision. I think technically, we'd be ok to do the short-circuiting when both are known to be PartialStruct (since we know that they widenlattice to a type), but it doesn't seem worth the extra effort to check.
Author
Parents
Loading