From fd74479a2bf2e4ccc35d1c2fa206de8f28be1e54 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 21 Sep 2025 16:28:57 -0400 Subject: Deprecate optional '?' postfix operator --- src/typecheck.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/typecheck.c') diff --git a/src/typecheck.c b/src/typecheck.c index 64bf0fd8..b4798768 100644 --- a/src/typecheck.c +++ b/src/typecheck.c @@ -798,12 +798,6 @@ type_t *get_type(env_t *env, ast_t *ast) { default: return Type(PointerType, .pointed = get_type(env, value), .is_stack = true); } } - case Optional: { - ast_t *value = Match(ast, Optional)->value; - type_t *t = get_type(env, value); - if (t->tag == OptionalType) code_err(ast, "This value is already optional, it can't be converted to optional"); - return Type(OptionalType, .type = t); - } case NonOptional: { ast_t *value = Match(ast, NonOptional)->value; type_t *t = get_type(env, value); -- cgit v1.2.3