diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-16 16:06:19 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-16 16:06:19 -0400 |
| commit | de49bc5bb3198f450cb367085f9def0d89782258 (patch) | |
| tree | a81354271bd3de567a7656807416cd5c69e4b08b /typecheck.c | |
| parent | 821bde156c222c7384c67517d773dc14a03342e7 (diff) | |
Deprecate :or_else()/:or_fail()/:or_exit() in favor of the `or` operator
Diffstat (limited to 'typecheck.c')
| -rw-r--r-- | typecheck.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/typecheck.c b/typecheck.c index f5e130f3..eefd92b5 100644 --- a/typecheck.c +++ b/typecheck.c @@ -838,13 +838,6 @@ type_t *get_type(env_t *env, ast_t *ast) else if (streq(call->name, "sorted")) return self_value_t; code_err(ast, "There is no '%s' method for %T tables", call->name, self_value_t); } - case OptionalType: { - type_t *nonnull = Match(self_value_t, OptionalType)->type; - if (streq(call->name, "or_else")) return nonnull; - else if (streq(call->name, "or_fail")) return nonnull; - else if (streq(call->name, "or_exit")) return nonnull; - code_err(ast, "There is no '%s' method for optional %T values", call->name, nonnull); - } default: { type_t *fn_type_t = get_method_type(env, call->self, call->name); if (!fn_type_t) |
