#if NET_4_5
// out argument
m = t.GetMethod ("invoke_out");
- var out_task = this_obj.InvokeMethodAsyncWithResult (e.Thread, m, new Value [] { vm.CreateValue (1) }, InvokeOptions.ReturnOutArgs);
+ var out_task = this_obj.InvokeMethodAsyncWithResult (e.Thread, m, new Value [] { vm.CreateValue (1), vm.CreateValue (null) }, InvokeOptions.ReturnOutArgs);
var out_args = out_task.Result.OutArgs;
AssertValue (5, out_args [0]);
+ Assert.IsTrue (out_args [1] is ArrayMirror);
+ Assert.AreEqual (10, (out_args [1] as ArrayMirror).Length);
// without ReturnOutArgs flag
- out_task = this_obj.InvokeMethodAsyncWithResult (e.Thread, m, new Value [] { vm.CreateValue (1) });
+ out_task = this_obj.InvokeMethodAsyncWithResult (e.Thread, m, new Value [] { vm.CreateValue (1), vm.CreateValue (null) });
out_args = out_task.Result.OutArgs;
Assert.IsNull (out_args);
#endif
err = decode_value (sig->params [i], domain, (guint8*)&args [i], p, &p, end);
if (err)
break;
-
if (args [i] && ((MonoObject*)args [i])->vtable->domain != domain)
NOT_IMPLEMENTED;
+
+ if (sig->params [i]->byref) {
+ arg_buf [i] = g_alloca (sizeof (mgreg_t));
+ *(gpointer*)arg_buf [i] = args [i];
+ args [i] = arg_buf [i];
+ }
} else {
arg_buf [i] = g_alloca (mono_class_instance_size (mono_class_from_mono_type (sig->params [i])));
err = decode_value (sig->params [i], domain, arg_buf [i], p, &p, end);