Browse Source

fix wrong exact value kind comparison

fusion32 1 năm trước cách đây
mục cha
commit
5ef8a092f6
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/check_expr.cpp

+ 1 - 1
src/check_expr.cpp

@@ -7640,7 +7640,7 @@ gb_internal CallArgumentError check_polymorphic_record_type(CheckerContext *c, O
 						s = write_type_to_string(s, v->type, false);
 					}
 				} else if (v->kind == Entity_Constant) {
-					if (v->type->kind != ExactValue_Invalid) {
+					if (v->Constant.value.kind != ExactValue_Invalid) {
 						s = gb_string_append_fmt(s, "=");
 						s = write_exact_value_to_string(s, v->Constant.value);
 					}