strengthening the error recovery
Signed-off-by: Jakub Doka <jakub.doka2@gmail.com>
This commit is contained in:
parent
9fe8d6bbff
commit
d2fa41039b
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue