MonoObject *delegate;
gpointer func;
MonoMethod *method = info->method;
+ MonoMethodSignature *sig = mono_method_signature(method);
mono_class_init_checked (delegate_class, &error);
if (mono_error_set_pending_exception (&error))
}
}
+ if (sig->generic_param_count && method->wrapper_type == MONO_WRAPPER_NONE) {
+ if (!method->is_inflated) {
+ mono_set_pending_exception(mono_get_exception_argument("method", " Cannot bind to the target method because its signature differs from that of the delegate type"));
+ return NULL;
+ }
+ }
+
delegate = mono_object_new_checked (mono_object_domain (type), delegate_class, &error);
if (mono_error_set_pending_exception (&error))
return NULL;