1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use crate::{language::ty::*, type_system::*, types::DeterministicallyAborts};
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct TyCodeBlock {
pub contents: Vec<TyAstNode>,
}
impl CopyTypes for TyCodeBlock {
fn copy_types_inner(&mut self, type_mapping: &TypeMapping) {
self.contents
.iter_mut()
.for_each(|x| x.copy_types(type_mapping));
}
}
impl DeterministicallyAborts for TyCodeBlock {
fn deterministically_aborts(&self) -> bool {
self.contents.iter().any(|x| x.deterministically_aborts())
}
}