propagating unreachable for functions returning never type

Signed-off-by: Jakub Doka <jakub.doka2@gmail.com>
This commit is contained in:
Jakub Doka 2024-12-17 19:08:53 +01:00
parent 14cf5efaa5
commit d3f3fe98e3
No known key found for this signature in database
GPG key ID: C6E9A89936B8C143

View file

@ -2660,6 +2660,10 @@ impl<'a> Codegen<'a> {
self.add_clobber_stores(clobbered_aliases);
if sig.ret == ty::Id::NEVER {
return None;
}
alt_value.or(Some(Value::new(self.ci.ctrl.get()).ty(sig.ret)))
}
}