Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: function signature mismatch when invoking a generic delegate #8

Open
jeromelaban opened this issue Feb 1, 2018 · 0 comments

Comments

@jeromelaban
Copy link

Given the following extension:

public static class FuncMemoizeExtensions
{
    public static Func<TParam, TResult> Test<TParam, TResult>(this Func<TParam, TResult> func)
    {
       return v => default(TResult);
    }
}

and the following code :

Func<int, int> a = i => i;
var a2 = a.Test();

a(1);
a2(1);

a(1) is executed properly, where a2(1) fails in chrome with the following error:

wasm-02396cee-9252:212 Uncaught (in promise) RuntimeError: function signature mismatch
    at hello_wrapper_delegate_invoke_System_Func_2_int_int_invoke_TResult_T_int (wasm-function[9252]:488)
    at hello_Hello_Main_string__ (wasm-function[9235]:1459)
    at mscorlib_wrapper_unknown_object_gsharedvt_out_sig_intptr_object__intptr_2 (wasm-function[18376]:40)
    at mscorlib_wrapper_runtime_invoke_object_runtime_invoke_sig_void_intptr_intptr_intptr_object_intptr_intptr_intptr (wasm-function[18034]:164)
    at mono_llvmonly_runtime_invoke (wasm-function[6921]:1024)
    at mono_jit_runtime_invoke (wasm-function[6678]:1025)
    at do_runtime_invoke (wasm-function[2044]:213)
    at mono_runtime_try_invoke (wasm-function[2158]:196)
    at do_try_exec_main (wasm-function[6592]:257)
    at mono_runtime_try_exec_main (wasm-function[6589]:78)
    at mono_runtime_try_run_main (wasm-function[6586]:154)
    at mono_jit_exec (wasm-function[6585]:300)
    at mono_wasm_main (wasm-function[9226]:424)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant