Make type_of use union-find

Otherwise we might have stale types floating around
This commit is contained in:
Max Bernstein 2025-04-23 11:57:08 -04:00 committed by Takashi Kokubun
parent 4c1f29fd58
commit c2677f4d0b
Notes: git 2025-04-24 18:33:28 +00:00

View File

@ -789,7 +789,7 @@ impl Function {
fn type_of(&self, insn: InsnId) -> Type {
assert!(self.insns[insn.0].has_output());
self.insn_types[insn.0]
self.insn_types[self.union_find.find_const(insn).0]
}
/// Check if the type of `insn` is a subtype of `ty`.