mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-28 12:14:43 +00:00
feat: support refinement class
This commit is contained in:
parent
c72de02c2c
commit
678c02faf9
9 changed files with 94 additions and 4 deletions
|
@ -536,6 +536,9 @@ impl Context {
|
|||
(Mono(n), NamedTuple(_)) => &n[..] == "GenericNamedTuple" || &n[..] == "GenericTuple",
|
||||
(Mono(n), Record(_)) => &n[..] == "Record",
|
||||
(Type, Subr(subr)) => self.supertype_of(&Type, &subr.return_t),
|
||||
(Type, Poly { name, params }) if &name[..] == "Set" => {
|
||||
self.convert_tp_into_value(params[0].clone()).is_ok()
|
||||
}
|
||||
(Type, Poly { name, params })
|
||||
if &name[..] == "Array" || &name[..] == "UnsizedArray" || &name[..] == "Set" =>
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue