diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-07-21 16:43:43 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-07-21 16:43:43 -0400 |
| commit | 27a5f2c4fa9cfa104faa4cc2b15cd21cc5a5501f (patch) | |
| tree | 962407c4c0131944363cd83305706de3b0989d28 /src/ir.cpp | |
| parent | 72e983670e65eac0b89da5564432988862828b30 (diff) | |
| download | zig-27a5f2c4fa9cfa104faa4cc2b15cd21cc5a5501f.tar.gz zig-27a5f2c4fa9cfa104faa4cc2b15cd21cc5a5501f.zip | |
remove errors for async calling convention
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 2332e28c84..96d355bc95 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -14984,20 +14984,6 @@ static IrInstruction *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCallSrc *c } return ira->codegen->invalid_instruction; } - if (fn_type_id->cc == CallingConventionAsync && !call_instruction->is_async) { - ErrorMsg *msg = ir_add_error(ira, fn_ref, buf_sprintf("must use async keyword to call async function")); - if (fn_proto_node) { - add_error_note(ira->codegen, msg, fn_proto_node, buf_sprintf("declared here")); - } - return ira->codegen->invalid_instruction; - } - if (fn_type_id->cc != CallingConventionAsync && call_instruction->is_async) { - ErrorMsg *msg = ir_add_error(ira, fn_ref, buf_sprintf("cannot use async keyword to call non-async function")); - if (fn_proto_node) { - add_error_note(ira->codegen, msg, fn_proto_node, buf_sprintf("declared here")); - } - return ira->codegen->invalid_instruction; - } if (fn_type_id->is_var_args) { |
