Skip to content

Commit

Permalink
[mono] Expanding a marshaller error message (#88726)
Browse files Browse the repository at this point in the history
* Expanding error message in #46926

* Removing unnecessary code.
  • Loading branch information
jandupej authored Jul 12, 2023
1 parent 0a02942 commit 6bcc188
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/mono/mono/metadata/marshal-lightweight.c
Original file line number Diff line number Diff line change
Expand Up @@ -2504,7 +2504,11 @@ emit_managed_wrapper_ilgen (MonoMethodBuilder *mb, MonoMethodSignature *invoke_s

if (!sig->hasthis && sig->param_count != invoke_sig->param_count) {
/* Closed delegate */
g_assert (sig->param_count == invoke_sig->param_count + 1);
if (sig->param_count != invoke_sig->param_count + 1) {
g_warning ("Closed delegate has incorrect number of arguments: %s.", mono_method_full_name (method, TRUE));
g_assert_not_reached ();
}

closed = TRUE;
/* Use a new signature without the first argument */
sig = mono_metadata_signature_dup (sig);
Expand Down

0 comments on commit 6bcc188

Please sign in to comment.