fix: reduce unreachables

This commit is contained in:
Shunsuke Shibayama 2023-07-15 12:40:23 +09:00
parent 0152e368ab
commit 072d62f7b3
5 changed files with 55 additions and 21 deletions

View file

@ -4159,6 +4159,13 @@ impl Signature {
}
}
pub fn t_spec_op_mut(&mut self) -> Option<&mut TypeSpecWithOp> {
match self {
Self::Var(v) => v.t_spec.as_mut(),
Self::Subr(c) => c.return_t_spec.as_mut(),
}
}
pub fn is_const(&self) -> bool {
match self {
Self::Var(var) => var.is_const(),