diff options
Diffstat (limited to 'mono/mini/method-to-ir.c')
-rw-r--r-- | mono/mini/method-to-ir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mono/mini/method-to-ir.c b/mono/mini/method-to-ir.c index 364b81e690f..f6eccc4224b 100644 --- a/mono/mini/method-to-ir.c +++ b/mono/mini/method-to-ir.c @@ -1850,8 +1850,8 @@ target_type_is_incompatible (MonoCompile *cfg, MonoType *target, MonoInst *arg) MonoClass *target_class_lowered = mono_class_from_mono_type (mini_get_underlying_type (&mono_class_from_mono_type (target)->byval_arg)); MonoClass *source_class_lowered = mono_class_from_mono_type (mini_get_underlying_type (&arg->klass->byval_arg)); - /* if the target is native int& or same type */ - if (target->type == MONO_TYPE_I || target_class_lowered == source_class_lowered) + /* if the target is native int& or X* or same type */ + if (target->type == MONO_TYPE_I || target->type == MONO_TYPE_PTR || target_class_lowered == source_class_lowered) return 0; /* Both are primitive type byrefs and the source points to a larger type that the destination */ |