mirror of
https://github.com/erg-lang/erg.git
synced 2025-10-03 05:54:33 +00:00
Add SetTypeSpec
This commit is contained in:
parent
3112fb31a9
commit
2cf4b5aba8
6 changed files with 85 additions and 12 deletions
|
@ -784,6 +784,11 @@ impl Context {
|
|||
let len = self.instantiate_const_expr(&arr.len);
|
||||
Ok(array(elem_t, len))
|
||||
}
|
||||
TypeSpec::Set(set) => {
|
||||
let elem_t = self.instantiate_typespec(&set.ty, opt_decl_t, tmp_tv_ctx, mode)?;
|
||||
let len = self.instantiate_const_expr(&set.len);
|
||||
Ok(erg_type::constructors::set(elem_t, len))
|
||||
}
|
||||
// FIXME: unwrap
|
||||
TypeSpec::Tuple(tys) => Ok(tuple(
|
||||
tys.iter()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue