diff options
Diffstat (limited to 'typecheck.c')
| -rw-r--r-- | typecheck.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/typecheck.c b/typecheck.c index d60a84ea..34d62aad 100644 --- a/typecheck.c +++ b/typecheck.c @@ -986,7 +986,10 @@ type_t *get_type(env_t *env, ast_t *ast) } case While: case For: return Type(VoidType); - case InlineCCode: return Type(VoidType); + case InlineCCode: { + type_ast_t *type_ast = Match(ast, InlineCCode)->type; + return type_ast ? parse_type_ast(env, type_ast) : Type(VoidType); + } case Unknown: code_err(ast, "I can't figure out the type of: %W", ast); } code_err(ast, "I can't figure out the type of: %W", ast); |
