Commit 12924477a5

Andrew Kelley <andrew@ziglang.org>
2019-08-04 02:33:16
fix regression in calling extern functions
1 parent 87710a1
Changed files (2)
src/analyze.cpp
@@ -5182,6 +5182,9 @@ static Error resolve_coro_frame(CodeGen *g, ZigType *frame_type) {
                 buf_sprintf("function is not comptime-known; @asyncCall required"));
             return ErrorSemanticAnalyzeFail;
         }
+        if (callee->body_node == nullptr) {
+            continue;
+        }
 
         analyze_fn_body(g, callee);
         if (callee->anal_state == FnAnalStateInvalid) {
BRANCH_TODO
@@ -1,13 +1,13 @@
- * @asyncCall with an async function pointer
+ * suspension points inside branching control flow
+ * go over the commented out tests
+ * error return tracing
  * compile error for error: expected anyframe->T, found 'anyframe'
  * compile error for error: expected anyframe->T, found 'i32'
  * await of a non async function
  * async call on a non async function
  * cancel
  * defer and errdefer
- * safety for double await
  * implicit cast of normal function to async function should be allowed when it is inferred to be async
- * go over the commented out tests
  * revive std.event.Loop
  * @typeInfo for @Frame(func)
  * peer type resolution of *@Frame(func) and anyframe
@@ -15,7 +15,6 @@
  * returning a value from within a suspend block
  * make resuming inside a suspend block, with nothing after it, a must-tail call.
  * make sure there are safety tests for all the new safety features (search the new PanicFnId enum values)
- * error return tracing
  * compile error for casting a function to a non-async function pointer, but then later it gets inferred to be an async function
  * compile error for copying a frame
  * compile error for resuming a const frame pointer
@@ -33,3 +32,4 @@
    - suspend
    - resume
    - anyframe, anyframe->T
+ * safety for double await