chore: add record examples

This commit is contained in:
Shunsuke Shibayama 2023-08-20 10:58:33 +09:00
parent 5e71bd7fd0
commit a0ce142f7b
4 changed files with 25 additions and 5 deletions

View file

@ -1788,6 +1788,13 @@ impl Context {
Ok(array_t(union, len))
}
ValueObj::Set(set) => Ok(v_enum(set)),
ValueObj::Dict(dic) => {
let dic = dic
.into_iter()
.map(|(k, v)| (TyParam::Value(k), TyParam::Value(v)))
.collect();
Ok(dict_t(TyParam::Dict(dic)))
}
ValueObj::Subr(subr) => subr.as_type(self).ok_or(ValueObj::Subr(subr)),
other => Err(other),
}