diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-08-15 02:17:53 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-08-15 02:17:53 -0400 |
| commit | ed1667cb377dd8da51583e703c6677969addc993 (patch) | |
| tree | 531424aa9647ef49549000bb145e2b798c868154 /typecheck.c | |
| parent | 7a472752e5be47816f756d854a1b0756594fef98 (diff) | |
Add array:shuffled() and checks for array insertion
Diffstat (limited to 'typecheck.c')
| -rw-r--r-- | typecheck.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/typecheck.c b/typecheck.c index 2814bd03..52df81f3 100644 --- a/typecheck.c +++ b/typecheck.c @@ -716,6 +716,7 @@ type_t *get_type(env_t *env, ast_t *ast) else if (streq(call->name, "sort")) return Type(VoidType); else if (streq(call->name, "sorted")) return self_value_t; else if (streq(call->name, "shuffle")) return Type(VoidType); + else if (streq(call->name, "shuffled")) return self_value_t; else if (streq(call->name, "random")) return Match(self_value_t, ArrayType)->item_type; else if (streq(call->name, "sample")) return self_value_t; else if (streq(call->name, "clear")) return Type(VoidType); |
