fix regression in calling extern functions

This commit is contained in:
Andrew Kelley 2019-08-03 20:33:16 -04:00
parent 87710a1cc2
commit 12924477a5
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
2 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -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) {