diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-09-21 16:28:57 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-09-21 16:28:57 -0400 |
| commit | fd74479a2bf2e4ccc35d1c2fa206de8f28be1e54 (patch) | |
| tree | 0cdf5c4659264b612b5f3fbb4ce6a3b11dd736f5 /src/typecheck.c | |
| parent | 92185a002a2e8b669add454a945c0ecdc0904993 (diff) | |
Deprecate optional '?' postfix operator
Diffstat (limited to 'src/typecheck.c')
| -rw-r--r-- | src/typecheck.c | 6 |
1 files changed, 0 insertions, 6 deletions
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); |
