strengthening the error recovery

Signed-off-by: Jakub Doka <jakub.doka2@gmail.com>
This commit is contained in:
Jakub Doka 2024-12-16 15:00:48 +01:00
parent 9fe8d6bbff
commit d2fa41039b
No known key found for this signature in database
GPG key ID: C6E9A89936B8C143

View file

@ -105,6 +105,9 @@ impl Nodes {
}
fn as_ty(&self, cint: Nid) -> ty::Id {
if self[citn].ty == ty::Id::NEVER {
return ty::Id::NEVER;
}
debug_assert_eq!(self[cint].ty, ty::Id::TYPE);
ty::Id::from(match self[cint].kind {
Kind::CInt { value } => value as u64,