[runtime] Introduce kind test functions to cleanup things a bit.
[mono.git] / mono / metadata / object.c
index 61c9d61f7e586ba19550a965b89147833c85db05..c60d9d3f4e20c9fd4f39c98fc513be27405ac0c3 100644 (file)
@@ -1406,7 +1406,7 @@ build_imt_slots (MonoClass *klass, MonoVTable *vt, MonoDomain *domain, gpointer*
                for (method_slot_in_interface = 0; method_slot_in_interface < iface->method.count; method_slot_in_interface++) {
                        MonoMethod *method;
 
-                       if (slot_num >= 0 && iface->is_inflated) {
+                       if (slot_num >= 0 && mono_class_is_ginst (iface)) {
                                /*
                                 * The imt slot of the method is the same as for its declaring method,
                                 * see the comment in mono_method_get_imt_slot (), so we can
@@ -3745,7 +3745,7 @@ mono_nullable_init (guint8 *buf, MonoObject *value, MonoClass *klass)
 
        MonoClass *param_class = klass->cast_class;
 
-       mono_class_setup_fields_locking (klass);
+       mono_class_setup_fields (klass);
        g_assert (klass->fields_inited);
                                
        g_assert (mono_class_from_mono_type (klass->fields [0].type) == param_class);
@@ -3779,7 +3779,7 @@ mono_nullable_box (guint8 *buf, MonoClass *klass, MonoError *error)
        mono_error_init (error);
        MonoClass *param_class = klass->cast_class;
 
-       mono_class_setup_fields_locking (klass);
+       mono_class_setup_fields (klass);
        g_assert (klass->fields_inited);
 
        g_assert (mono_class_from_mono_type (klass->fields [0].type) == param_class);