aboutsummaryrefslogtreecommitdiff
path: root/src/ir.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-09-03 12:38:24 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-09-03 12:38:24 -0400
commita11e73bee2266d4c568bdf9b23c891ac1365bb09 (patch)
treeb0c4e5adbcd69a11e11f9244ac2462d4462cbdd2 /src/ir.cpp
parent3f273479f8f38fb408181b2ae2fff1acf4278ba1 (diff)
downloadzig-a11e73bee2266d4c568bdf9b23c891ac1365bb09.tar.gz
zig-a11e73bee2266d4c568bdf9b23c891ac1365bb09.zip
compile error instead of segfault for unimplemented feature
closes #1103
Diffstat (limited to 'src/ir.cpp')
-rw-r--r--src/ir.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp
index 5d1bbe3c08..98c749f623 100644
--- a/src/ir.cpp
+++ b/src/ir.cpp
@@ -6693,7 +6693,10 @@ static IrInstruction *ir_gen_fn_proto(IrBuilder *irb, Scope *parent_scope, AstNo
return irb->codegen->invalid_instruction;
}
} else {
- return_type = nullptr;
+ add_node_error(irb->codegen, node,
+ buf_sprintf("TODO implement inferred return types https://github.com/ziglang/zig/issues/447"));
+ return irb->codegen->invalid_instruction;
+ //return_type = nullptr;
}
IrInstruction *async_allocator_type_value = nullptr;