From d2fa41039bc361350c90f0af0a6b037a8e52b2ca Mon Sep 17 00:00:00 2001 From: Jakub Doka Date: Mon, 16 Dec 2024 15:00:48 +0100 Subject: [PATCH] strengthening the error recovery Signed-off-by: Jakub Doka --- lang/src/son.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lang/src/son.rs b/lang/src/son.rs index 351dab4..3ad3322 100644 --- a/lang/src/son.rs +++ b/lang/src/son.rs @@ -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,