Parcourir la source

proc at type lvl seg fault

smoke-y il y a 1 semaine
Parent
commit
5161731ce0
1 fichiers modifiés avec 6 ajouts et 4 suppressions
  1. 6 4
      src/check_expr.cpp

+ 6 - 4
src/check_expr.cpp

@@ -7947,10 +7947,12 @@ gb_internal CallArgumentError check_polymorphic_record_type(CheckerContext *c, O
 				s = gb_string_append_fmt(s, "$%.*s", LIT(name));
 
 				if (v->kind == Entity_TypeName) {
-					if (v->type->kind != Type_Generic) {
-						s = gb_string_append_fmt(s, "=");
-						s = write_type_to_string(s, v->type, false);
-					}
+					if(v->type){
+						if (v->type->kind != Type_Generic) {
+							s = gb_string_append_fmt(s, "=");
+							s = write_type_to_string(s, v->type, false);
+						}
+					};
 				} else if (v->kind == Entity_Constant) {
 					if (v->Constant.value.kind != ExactValue_Invalid) {
 						s = gb_string_append_fmt(s, "=");