authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-02-15 23:39:35-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-02-15 23:39:35-05:00
logcbbd6cfa1e85dc5cda38572f7a1d462a678c2adf
tree64ccba9c61fcccec6ce824db1f646b9b3ef0875b
parent5f5880979e8c5a7cfa4efdabad6358ceb89cc0e7

add an assert to catch #777

asserting is better than segfaulting

1 files changed, 1 insertions(+), 0 deletions(-)

src/codegen.cpp+1
...@@ -4373,6 +4373,7 @@ static LLVMValueRef gen_const_val(CodeGen *g, ConstExprValue *const_val, const c...@@ -4373,6 +4373,7 @@ static LLVMValueRef gen_const_val(CodeGen *g, ConstExprValue *const_val, const c
4373 }4373 }
4374 }4374 }
4375 }4375 }
4376 zig_unreachable();
4376 case TypeTableEntryIdErrorUnion:4377 case TypeTableEntryIdErrorUnion:
4377 {4378 {
4378 TypeTableEntry *payload_type = type_entry->data.error_union.payload_type;4379 TypeTableEntry *payload_type = type_entry->data.error_union.payload_type;