* Assume MRGCTX mode if mini_method_is_default_method is true
* Fixes https://github.com/dotnet/runtime/issues/57664
Co-authored-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
/*
* The caller is gshared code, compute the actual method to call from M and this/rgctx.
*/
- if (m->is_inflated && mono_method_get_context (m)->method_inst) {
+ if (m->is_inflated && (mono_method_get_context (m)->method_inst || mini_method_is_default_method (m))) {
MonoMethodRuntimeGenericContext *mrgctx = (MonoMethodRuntimeGenericContext*)mono_arch_find_static_call_vtable (regs, code);
klass = mrgctx->class_vtable->klass;