authorgravatar for thatlemon@gmail.comLemonBoy <thatlemon@gmail.com> 2020-01-19 10:06:48+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-01-19 13:28:27-05:00
log7a1cde7206263c8bb3265c225ed4213d1b7bdb58
tree4336078e252ee1225f91d0fa28231a09a976c7c4
parente491b2f5a7af5bff98cf8fb7ce8ce8ab27dfb9bc

Fix wrong error code being returned in enum analisys

Fixes the assertion failure seen in #4233

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

src/analyze.cpp+1-1
...@@ -2605,7 +2605,7 @@ static Error resolve_enum_zero_bits(CodeGen *g, ZigType *enum_type) {...@@ -2605,7 +2605,7 @@ static Error resolve_enum_zero_bits(CodeGen *g, ZigType *enum_type) {
2605 buf_ptr(&wanted_tag_int_type->name)));2605 buf_ptr(&wanted_tag_int_type->name)));
2606 add_error_note(g, msg, decl_node->data.container_decl.init_arg_expr,2606 add_error_note(g, msg, decl_node->data.container_decl.init_arg_expr,
2607 buf_sprintf("any integral type of size 8, 16, 32, 64 or 128 bit is valid"));2607 buf_sprintf("any integral type of size 8, 16, 32, 64 or 128 bit is valid"));
2608 return ErrorNone;2608 return ErrorSemanticAnalyzeFail;
2609 }2609 }
2610 }2610 }
2611 tag_int_type = wanted_tag_int_type;2611 tag_int_type = wanted_tag_int_type;