diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/compile.c | 2 | ||||
| -rw-r--r-- | src/typecheck.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/compile.c b/src/compile.c index 888a0975..02b23919 100644 --- a/src/compile.c +++ b/src/compile.c @@ -3215,7 +3215,7 @@ CORD compile(env_t *env, ast_t *ast) arg_t *arg_spec = new(arg_t, .name="item", .type=item_t); return CORD_all("List$find_value(", self, ", ", compile_arguments(env, ast, arg_spec, call->args), ", ", compile_type_info(self_value_t), ")"); - } else if (streq(call->name, "first")) { + } else if (streq(call->name, "where")) { self = compile_to_pointer_depth(env, call->self, 0, call->args != NULL); type_t *item_ptr = Type(PointerType, .pointed=item_t, .is_stack=true); type_t *predicate_type = Type( diff --git a/src/typecheck.c b/src/typecheck.c index 8f47433c..7f7cb438 100644 --- a/src/typecheck.c +++ b/src/typecheck.c @@ -900,7 +900,7 @@ type_t *get_type(env_t *env, ast_t *ast) else if (streq(call->name, "clear")) return Type(VoidType); else if (streq(call->name, "counts")) return Type(TableType, .key_type=item_type, .value_type=INT_TYPE); else if (streq(call->name, "find")) return Type(OptionalType, .type=INT_TYPE); - else if (streq(call->name, "first")) return Type(OptionalType, .type=INT_TYPE); + else if (streq(call->name, "where")) return Type(OptionalType, .type=INT_TYPE); else if (streq(call->name, "from")) return self_value_t; else if (streq(call->name, "has")) return Type(BoolType); else if (streq(call->name, "heap_pop")) return Type(OptionalType, .type=item_type); |
