using System;
using System.Collections.Generic;
using System.Linq;
+using System.Runtime.CompilerServices;
class Tests {
static T Unbox <T> (object o) {
return (T) o;
}
+
+ interface IDefaultRetriever
+ {
+ T GetDefault<T>();
+ }
+
+ class DefaultRetriever : IDefaultRetriever
+ {
+ [MethodImpl(MethodImplOptions.Synchronized)]
+ public T GetDefault<T>()
+ {
+ return default(T);
+ }
+ }
+
+ public static int test_0_regress_668095_synchronized_gshared () {
+ return DoSomething (new DefaultRetriever ());
+ }
+
+ static int DoSomething(IDefaultRetriever foo) {
+ int result = foo.GetDefault<int>();
+ return result;
+ }
}
ji = NULL;
/* Avoid recursion */
- if (!(ji && ji->method->wrapper_type == MONO_WRAPPER_SYNCHRONIZED))
+ if (!(ji && ji->method->wrapper_type == MONO_WRAPPER_SYNCHRONIZED)) {
m = mono_marshal_get_synchronized_wrapper (m);
+ need_rgctx_tramp = FALSE;
+ }
}
/* Calls made through delegates on platforms without delegate trampolines */