mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 18:58:30 +00:00
fix: union type bug (2)
This commit is contained in:
parent
3b9bbdf1a5
commit
461e91703a
5 changed files with 73 additions and 54 deletions
|
@ -588,10 +588,10 @@ impl Context {
|
|||
neg.register_builtin_erg_decl(OP_NEG, op_t, Visibility::BUILTIN_PUBLIC);
|
||||
neg.register_builtin_erg_decl(OUTPUT, Type, Visibility::BUILTIN_PUBLIC);
|
||||
/* Num */
|
||||
let mut num = Self::builtin_mono_trait(NUM, 2);
|
||||
num.register_superclass(poly(ADD, vec![]), &add);
|
||||
num.register_superclass(poly(SUB, vec![]), &sub);
|
||||
num.register_superclass(poly(MUL, vec![]), &mul);
|
||||
let num = Self::builtin_mono_trait(NUM, 2);
|
||||
// num.register_superclass(poly(ADD, vec![]), &add);
|
||||
// num.register_superclass(poly(SUB, vec![]), &sub);
|
||||
// num.register_superclass(poly(MUL, vec![]), &mul);
|
||||
/* ToBool */
|
||||
let mut to_bool = Self::builtin_mono_trait(TO_BOOL, 2);
|
||||
let _Slf = mono_q(SELF, subtypeof(mono(TO_BOOL)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue