|
@@ -1293,6 +1293,11 @@ gb_internal void check_assignment(CheckerContext *c, Operand *operand, Type *typ
|
|
error_line("\t Got: %s\n", s_got);
|
|
error_line("\t Got: %s\n", s_got);
|
|
gb_string_free(s_got);
|
|
gb_string_free(s_got);
|
|
gb_string_free(s_expected);
|
|
gb_string_free(s_expected);
|
|
|
|
+
|
|
|
|
+ Type *tx = x->Proc.params->Tuple.variables[0]->type;
|
|
|
|
+ Type *ty = y->Proc.params->Tuple.variables[0]->type;
|
|
|
|
+ gb_printf_err("%s kind:%.*s e:%p ot:%p\n", type_to_string(tx), LIT(type_strings[tx->kind]), tx->Named.type_name, tx->Named.type_name->TypeName.original_type_for_parapoly);
|
|
|
|
+ gb_printf_err("%s kind:%.*s e:%p ot:%p\n", type_to_string(ty), LIT(type_strings[ty->kind]), ty->Named.type_name, ty->Named.type_name->TypeName.original_type_for_parapoly);
|
|
} else {
|
|
} else {
|
|
gbString s_expected = type_to_string(y);
|
|
gbString s_expected = type_to_string(y);
|
|
gbString s_got = type_to_string(x);
|
|
gbString s_got = type_to_string(x);
|
|
@@ -7908,11 +7913,10 @@ gb_internal CallArgumentError check_polymorphic_record_type(CheckerContext *c, O
|
|
|
|
|
|
{
|
|
{
|
|
GenTypesData *found_gen_types = ensure_polymorphic_record_entity_has_gen_types(c, original_type);
|
|
GenTypesData *found_gen_types = ensure_polymorphic_record_entity_has_gen_types(c, original_type);
|
|
|
|
+ mutex_lock(&found_gen_types->mutex);
|
|
|
|
+ defer (mutex_unlock(&found_gen_types->mutex));
|
|
|
|
|
|
- rw_mutex_shared_lock(&found_gen_types->mutex);
|
|
|
|
Entity *found_entity = find_polymorphic_record_entity(found_gen_types, param_count, ordered_operands);
|
|
Entity *found_entity = find_polymorphic_record_entity(found_gen_types, param_count, ordered_operands);
|
|
- rw_mutex_shared_unlock(&found_gen_types->mutex);
|
|
|
|
-
|
|
|
|
if (found_entity) {
|
|
if (found_entity) {
|
|
operand->mode = Addressing_Type;
|
|
operand->mode = Addressing_Type;
|
|
operand->type = found_entity->type;
|
|
operand->type = found_entity->type;
|