diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-07-10 13:34:45 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-07-10 13:34:45 -0400 |
| commit | 10e86153a2c619d7f853ab149e451a9cc05fdb27 (patch) | |
| tree | eded5dc8c1fc50168545f2b40575ebd2b6bf078f /typecheck.c | |
| parent | df765200c41692eed41c0f84a8b9a32e39f7fa34 (diff) | |
Replace array:slice() with array:from(first, last) and array:by(step)
Diffstat (limited to 'typecheck.c')
| -rw-r--r-- | typecheck.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/typecheck.c b/typecheck.c index 9a93211d..5cc9d664 100644 --- a/typecheck.c +++ b/typecheck.c @@ -669,7 +669,8 @@ type_t *get_type(env_t *env, ast_t *ast) return Type(PointerType, .pointed=Match(self_value_t, ArrayType)->item_type, .is_optional=true, .is_readonly=true); else if (streq(call->name, "sample")) return self_value_t; else if (streq(call->name, "clear")) return Type(VoidType); - else if (streq(call->name, "slice")) return self_value_t; + else if (streq(call->name, "from")) return self_value_t; + else if (streq(call->name, "by")) return self_value_t; else if (streq(call->name, "reversed")) return self_value_t; else if (streq(call->name, "heapify")) return Type(VoidType); else if (streq(call->name, "heap_push")) return Type(VoidType); |
