authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-02-29 01:05:11-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-02-29 01:05:11-05:00
log3cba603eae1a1c8b0338f5584041c73d55682c0a
treeeaf747f253634521294e49b0ad5bf175af216771
parent1aef0bef754ddf1943e22740ef045fab7769cde1
signaturelock-open Commit is signed but in an unrecognized format.

fix crash when building docgen


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

src/analyze.cpp+5-2
......@@ -6734,8 +6734,6 @@ static bool const_values_equal_array(CodeGen *g, ZigValue *a, ZigValue *b, size_
67346734
67356735bool const_values_equal(CodeGen *g, ZigValue *a, ZigValue *b) {
67366736 if (a->type->id != b->type->id) return false;
6737 assert(a->special == ConstValSpecialStatic);
6738 assert(b->special == ConstValSpecialStatic);
67396737 if (a->type == b->type) {
67406738 switch (type_has_one_possible_value(g, a->type)) {
67416739 case OnePossibleValueInvalid:
......@@ -6746,6 +6744,11 @@ bool const_values_equal(CodeGen *g, ZigValue *a, ZigValue *b) {
67466744 return true;
67476745 }
67486746 }
6747 if (a->special == ConstValSpecialUndef || b->special == ConstValSpecialUndef) {
6748 return a->special == b->special;
6749 }
6750 assert(a->special == ConstValSpecialStatic);
6751 assert(b->special == ConstValSpecialStatic);
67496752 switch (a->type->id) {
67506753 case ZigTypeIdOpaque:
67516754 zig_unreachable();