aboutsummaryrefslogtreecommitdiff
path: root/typecheck.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-11-29 19:39:17 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-11-29 19:39:17 -0500
commite2fa11b7fe35c6d7033e15725d08a09bd0f3c73a (patch)
tree495ec5fa862b7415d88bec7291f734fa6a12ed37 /typecheck.c
parent0d6ef67a014f231b4e24b71bb85ec1e4df5b6319 (diff)
Rename :serialize() -> :serialized()
Diffstat (limited to 'typecheck.c')
-rw-r--r--typecheck.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/typecheck.c b/typecheck.c
index ba228305..e602c774 100644
--- a/typecheck.c
+++ b/typecheck.c
@@ -722,10 +722,6 @@ type_t *get_type(env_t *env, ast_t *ast)
case FunctionCall: {
auto call = Match(ast, FunctionCall);
- // HACK:
- if (call->fn->tag == Var && streq(Match(call->fn, Var)->name, "serialize"))
- return Type(ArrayType, Type(ByteType));
-
type_t *fn_type_t = get_type(env, call->fn);
if (!fn_type_t)
code_err(call->fn, "I couldn't find this function");
@@ -747,7 +743,7 @@ type_t *get_type(env_t *env, ast_t *ast)
case MethodCall: {
auto call = Match(ast, MethodCall);
- if (streq(call->name, "serialize"))
+ if (streq(call->name, "serialized")) // Data serialization
return Type(ArrayType, Type(ByteType));
type_t *self_value_t = value_type(get_type(env, call->self));