small bugfix
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Fri, 19 Nov 2021 22:55:57 +0000 (16:55 -0600)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Fri, 19 Nov 2021 22:55:57 +0000 (16:55 -0600)
.gitignore
src/astnodes.c

index 07641e0af46492f2e32417fb35d3f872d4d3fd60..cacc5a8268d1bebaacb0d66947faea06b834c518 100644 (file)
@@ -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
index 50c9a629e0a7dae727a7297074868ac18ae36174..e56f21d6cc9e496317fc132059d331d071b996aa 100644 (file)
@@ -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)