mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-03 18:29:00 +00:00
fix: bytes
type definition
This commit is contained in:
parent
5096843bc5
commit
d0bae66450
1 changed files with 13 additions and 7 deletions
|
@ -51,13 +51,19 @@ impl Context {
|
|||
NoneType,
|
||||
);
|
||||
let t_bin = nd_func(vec![kw(KW_N, Int)], None, Str);
|
||||
// TODO: overload: Iterable(Int) -> Bytes
|
||||
let t_bytes = func(
|
||||
vec![],
|
||||
None,
|
||||
vec![kw(KW_STR, Str), kw(KW_ENCODING, Str)],
|
||||
mono(BYTES),
|
||||
);
|
||||
let t_bytes = func0(mono(BYTES))
|
||||
& func(
|
||||
vec![kw(KW_STR, Str), kw(KW_ENCODING, Str)],
|
||||
None,
|
||||
vec![kw(KW_ERRORS, Str)],
|
||||
mono(BYTES),
|
||||
)
|
||||
& nd_func(
|
||||
// TODO: Bytes-like
|
||||
vec![pos(poly(ITERABLE, vec![ty_tp(Nat)]) | Nat | mono(BYTES))],
|
||||
None,
|
||||
mono(BYTES),
|
||||
);
|
||||
let t_bytes_array = func(
|
||||
vec![],
|
||||
None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue