diff options
Diffstat (limited to 'src/typecheck.c')
| -rw-r--r-- | src/typecheck.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/typecheck.c b/src/typecheck.c index e34a85de..07f8aac4 100644 --- a/src/typecheck.c +++ b/src/typecheck.c @@ -606,6 +606,8 @@ type_t *get_function_type(env_t *env, ast_t *ast) { if (ast->tag == Lambda) { ast_t *body = Match(ast, Lambda)->body; + + scope->fn = NULL; type_t *ret_t = get_type(scope, body); if (ret_t->tag == ReturnType) ret_t = Match(ret_t, ReturnType)->ret; if (ret_t->tag == AbortType) ret_t = Type(VoidType); |
