diff --git a/lang/src/son.rs b/lang/src/son.rs index 351dab457..3ad332217 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,