var type = Expr.Type;
if (IsByRef) {
var ml = (IMemoryLocation) Expr;
- ml.AddressOf (ec, AddressOp.Load);
+ ml.AddressOf (ec, AddressOp.LoadStore);
type = ReferenceContainer.MakeType (ec.Module, type);
} else {
Expr.Emit (ec);
b = 500;
}
+
+ static void Test<T> (T[] t)
+ {
+ Foo (b: ref t[1], a: t[0]);
+ }
+
+ static void Foo<T> (T a, ref T b)
+ {
+ b = a;
+ }
public static int Main ()
{
if (a [2].Foo != 1)
return 3;
+ var array = new [] { 3, 4 };
+ Test<int>(array);
+ if (array [1] != 3)
+ return 4;
+
return 0;
}
}
<size>40</size>
</method>
<method name="Int32 Main()">
- <size>242</size>
+ <size>277</size>
</method>
<method name="Void .ctor()">
<size>7</size>
</method>
+ <method name="Void Test[T](T[])">
+ <size>22</size>
+ </method>
+ <method name="Void Foo[T](T, T ByRef)">
+ <size>8</size>
+ </method>
</type>
</test>
<test name="test-named-05.cs">