Skip to content

Commit

Permalink
Expanding error message in dotnet#46926
Browse files Browse the repository at this point in the history
  • Loading branch information
jandupej committed Jun 2, 2023
1 parent 7b2dc26 commit 8f40206
Show file tree
Hide file tree
Showing 2 changed files with 6 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
1 change: 1 addition & 0 deletions src/mono/sample/wasm/wasm-nl-no-marshal
Submodule wasm-nl-no-marshal added at 35d311

0 comments on commit 8f40206

Please sign in to comment.