mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 12:24:45 +00:00
Add: register floordiv
This commit is contained in:
parent
900a5bb38e
commit
ea61870a33
1 changed files with 9 additions and 0 deletions
|
@ -1852,6 +1852,15 @@ impl Context {
|
||||||
);
|
);
|
||||||
self.register_builtin_impl("__mul__", op_t, Const, Private);
|
self.register_builtin_impl("__mul__", op_t, Const, Private);
|
||||||
let op_t = bin_op(l.clone(), r.clone(), mono_proj(mono_q("L"), "Output"));
|
let op_t = bin_op(l.clone(), r.clone(), mono_proj(mono_q("L"), "Output"));
|
||||||
|
let op_t = quant(
|
||||||
|
op_t,
|
||||||
|
set! {
|
||||||
|
static_instance("R", Type),
|
||||||
|
subtypeof(l.clone(), builtin_poly("FloorDiv", params.clone()))
|
||||||
|
},
|
||||||
|
);
|
||||||
|
self.register_builtin_impl("__floordiv__", op_t, Const, Private);
|
||||||
|
let op_t = bin_op(l.clone(), r.clone(), mono_proj(mono_q("L"), "Output"));
|
||||||
let op_t = quant(
|
let op_t = quant(
|
||||||
op_t,
|
op_t,
|
||||||
set! {
|
set! {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue