feat: enhance os, random type decls

This commit is contained in:
Shunsuke Shibayama 2024-03-24 13:02:26 +09:00
parent 54bd111a5f
commit 35f55c62d3
4 changed files with 63 additions and 1 deletions

View file

@ -2096,7 +2096,10 @@ impl Context {
if let Some(Greater) = self.try_cmp(&l, &r) {
panic!("{l}..{r} is not a valid interval type (should be lhs <= rhs)")
}
Ok(int_interval(op, l, r))
let l_t = self.get_tp_t(&l).unwrap_or(Obj).derefine();
let r_t = self.get_tp_t(&r).unwrap_or(Obj).derefine();
let t = self.union(&l_t, &r_t);
Ok(interval(op, t, l, r))
}
TypeSpec::Subr(subr) => {
let mut errs = TyCheckErrors::empty();