diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/compile/statements.c | 2 | ||||
| -rw-r--r-- | src/typecheck.c | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/src/compile/statements.c b/src/compile/statements.c index 638f1341..4bb8b432 100644 --- a/src/compile/statements.c +++ b/src/compile/statements.c @@ -218,8 +218,6 @@ static Text_t _compile_statement(env_t *env, ast_t *ast) { } case Metadata: return EMPTY_TEXT; default: - // print("Is discardable: ", ast_to_sexp_str(ast), " ==> ", - // is_discardable(env, ast)); if (!is_discardable(env, ast)) code_err(ast, "The ", type_to_text(get_type(env, ast)), " result of this statement cannot be discarded"); return Texts("(void)", compile(env, ast), ";"); diff --git a/src/typecheck.c b/src/typecheck.c index e432759b..6f8fa0ba 100644 --- a/src/typecheck.c +++ b/src/typecheck.c @@ -1539,7 +1539,7 @@ PUREFUNC bool is_discardable(env_t *env, ast_t *ast) { default: break; } type_t *t = get_type(env, ast); - return (t->tag == VoidType || t->tag == AbortType || t->tag == ReturnType); + return (t->tag == VoidType || t->tag == AbortType || t->tag == ReturnType || t == EMPTY_TYPE); } type_t *get_arg_ast_type(env_t *env, arg_ast_t *arg) { |
