aboutsummaryrefslogtreecommitdiff
path: root/typecheck.c
diff options
context:
space:
mode:
Diffstat (limited to 'typecheck.c')
-rw-r--r--typecheck.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/typecheck.c b/typecheck.c
index 49ebe582..a790f73d 100644
--- a/typecheck.c
+++ b/typecheck.c
@@ -667,8 +667,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, "random"))
- return Type(PointerType, .pointed=Match(self_value_t, ArrayType)->item_type, .is_optional=true, .is_readonly=true);
+ 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);
else if (streq(call->name, "from")) return self_value_t;