Created attachment 18657 [details]
When using Rhino mocks to create a DynamicMock for an interface with a generic method an assertion is raised and the process dies.
See attached both a test case and the stacktrace.
compile the testcase with:
mcs -t:exe -r:Rhino.Mocks test.cs
mono --debug test.exe
If you compile with -DLESS_GENERIC the test succeeds (prints: "Done: 00000000-0000-0000-0000-000000000000")
Created attachment 18658 [details]
Assert Abort Stacktrace
This is one of our awesome corner cases where a finished typebuilder references a generic instantiation of an unfinished one. reflection_setup_internal_class minimally initializes the referenced type, but it doesn't have enough info to make the call on whether the type will be a generic or not. But when we go to instantiate in mono_reflection_bind_generic_parameters we expect to see a generic type definition.
Working on a minimal standalone reproduction...
Created attachment 18698 [details]
Standalone reproduction without dependencies.
Fixed in Mono master https://github.com/mono/mono/commit/a713a14521da8ddf992c4a3e64855d56cb7897a3