aboutsummaryrefslogtreecommitdiff
path: root/typecheck.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-08-18 23:24:23 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-08-18 23:24:23 -0400
commit2e8c949fdcf56d6055ed8b78a825d9061ab0ceb4 (patch)
treef3644759f7045185b110f3d81d18067b55feab49 /typecheck.c
parentb76fbd3beba08c098c6d18578230f9edbc4d3a3d (diff)
Rename push/pop to give/get, since it's not stack-ordered
Diffstat (limited to 'typecheck.c')
-rw-r--r--typecheck.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/typecheck.c b/typecheck.c
index 1018f33e..805f83e0 100644
--- a/typecheck.c
+++ b/typecheck.c
@@ -771,9 +771,9 @@ type_t *get_type(env_t *env, ast_t *ast)
}
case ChannelType: {
if (streq(call->name, "clear")) return Type(VoidType);
- else if (streq(call->name, "pop")) return Match(self_value_t, ChannelType)->item_type;
- else if (streq(call->name, "push")) return Type(VoidType);
- else if (streq(call->name, "push_all")) return Type(VoidType);
+ else if (streq(call->name, "get")) return Match(self_value_t, ChannelType)->item_type;
+ else if (streq(call->name, "give")) return Type(VoidType);
+ else if (streq(call->name, "give_all")) return Type(VoidType);
else if (streq(call->name, "view")) return Type(ArrayType, .item_type=Match(self_value_t, ChannelType)->item_type);
else code_err(ast, "There is no '%s' method for arrays", call->name);
}