Skip to content

Commit 6bcc188

Browse files
authored
[mono] Expanding a marshaller error message (#88726)
* Expanding error message in #46926 * Removing unnecessary code.
1 parent 0a02942 commit 6bcc188

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/mono/mono/metadata/marshal-lightweight.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2504,7 +2504,11 @@ emit_managed_wrapper_ilgen (MonoMethodBuilder *mb, MonoMethodSignature *invoke_s
25042504

25052505
if (!sig->hasthis && sig->param_count != invoke_sig->param_count) {
25062506
/* Closed delegate */
2507-
g_assert (sig->param_count == invoke_sig->param_count + 1);
2507+
if (sig->param_count != invoke_sig->param_count + 1) {
2508+
g_warning ("Closed delegate has incorrect number of arguments: %s.", mono_method_full_name (method, TRUE));
2509+
g_assert_not_reached ();
2510+
}
2511+
25082512
closed = TRUE;
25092513
/* Use a new signature without the first argument */
25102514
sig = mono_metadata_signature_dup (sig);

0 commit comments

Comments
 (0)