From: Brendan Hansen Date: Fri, 19 Nov 2021 22:55:57 +0000 (-0600) Subject: small bugfix X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=9fd95e32bf4d9fb9b83db925c51297fc43108c6b;p=onyx.git small bugfix --- diff --git a/.gitignore b/.gitignore index 07641e0a..cacc5a82 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,5 @@ session.vim *.rdbg tmp/ .vimspector.json -.vscode/ \ No newline at end of file +.vscode/ +dist/ \ No newline at end of file diff --git a/src/astnodes.c b/src/astnodes.c index 50c9a629..e56f21d6 100644 --- a/src/astnodes.c +++ b/src/astnodes.c @@ -582,6 +582,7 @@ TypeMatch unify_node_and_type_(AstTyped** pnode, Type* type, b32 permanent) { if (node->kind == Ast_Kind_Overloaded_Function) { AstTyped* func = find_matching_overload_by_type(((AstOverloadedFunction *) node)->overloads, type); if (func == NULL) return TYPE_MATCH_FAILED; + if (func == (AstTyped *) &node_that_signals_a_yield) return TYPE_MATCH_YIELD; // HACK: It feels like there should be a better place to flag that a procedure was definitely used. if (func->kind == Ast_Kind_Function)