--- /dev/null
+// Compiler options: -warn:4 -warnaserror
+
+using System;
+
+// Nothing wrong with this, gmcs says otherwise
+// Class is generic
+public class TestGeneric<T>
+{
+ public event EventHandler Event;
+
+ public void Raise ()
+ {
+ Event (this, EventArgs.Empty);
+ }
+}
+
+// Nothing wrong with this, gmcs concurs
+// Note that T is used in the delegate signature for Event
+public class TestGeneric2<T>
+{
+ public delegate void GenericHandler (T t);
+ public event GenericHandler Event;
+
+ public void Raise ()
+ {
+ Event (default (T));
+ }
+}
+
+// Nothing wrong with this, gmcs concurs
+// Class is not generic
+public class Test
+{
+ public event EventHandler Event;
+
+ public void Raise ()
+ {
+ Event (this, EventArgs.Empty);
+ }
+
+ public static void Main ()
+ {
+ }
+}
+
--- /dev/null
+using System;
+
+struct S
+{
+ public int Foo;
+}
+
+class Program
+{
+ static void Foo2 (int a, ref int b)
+ {
+ Console.WriteLine (a);
+ Console.WriteLine (b);
+
+ if (a != 0 || b != 0)
+ throw new ApplicationException ();
+
+ b = 500;
+ }
+
+ public static int Main ()
+ {
+ var a = new S [] { new S (), new S (), new S () };
+ int i = 1;
+ Foo2 (b: ref a[i].Foo, a: a[++i].Foo++);
+
+ Console.WriteLine (a[0].Foo);
+ Console.WriteLine (a[1].Foo);
+ Console.WriteLine (a[2].Foo);
+
+ if (a [0].Foo != 0)
+ return 1;
+
+ if (a [1].Foo != 500)
+ return 2;
+
+ if (a [2].Foo != 1)
+ return 3;
+
+ return 0;
+ }
+}
</method>
</type>
</test>
+ <test name="test-736.cs">
+ <type name="TestGeneric`1[T]">
+ <method name="Void add_Event(System.EventHandler)">
+ <size>24</size>
+ </method>
+ <method name="Void remove_Event(System.EventHandler)">
+ <size>24</size>
+ </method>
+ <method name="Void Raise()">
+ <size>18</size>
+ </method>
+ <method name="Void .ctor()">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="TestGeneric2`1[T]">
+ <method name="Void add_Event(TestGeneric2`1+GenericHandler[T])">
+ <size>24</size>
+ </method>
+ <method name="Void remove_Event(TestGeneric2`1+GenericHandler[T])">
+ <size>24</size>
+ </method>
+ <method name="Void Raise()">
+ <size>21</size>
+ </method>
+ <method name="Void .ctor()">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="Test">
+ <method name="Void add_Event(System.EventHandler)">
+ <size>24</size>
+ </method>
+ <method name="Void remove_Event(System.EventHandler)">
+ <size>24</size>
+ </method>
+ <method name="Void Raise()">
+ <size>18</size>
+ </method>
+ <method name="Void Main()">
+ <size>1</size>
+ </method>
+ <method name="Void .ctor()">
+ <size>7</size>
+ </method>
+ </type>
+ <type name="TestGeneric2`1+GenericHandler[T]">
+ <method name="Void Invoke(T)">
+ <size>0</size>
+ </method>
+ <method name="IAsyncResult BeginInvoke(T, System.AsyncCallback, System.Object)">
+ <size>0</size>
+ </method>
+ <method name="Void EndInvoke(IAsyncResult)">
+ <size>0</size>
+ </method>
+ <method name="Void .ctor(Object, IntPtr)">
+ <size>0</size>
+ </method>
+ </type>
+ </test>
<test name="test-74.cs">
<type name="X">
<method name="Void .ctor()">
</method>
</type>
</test>
+ <test name="test-named-04.cs">
+ <type name="Program">
+ <method name="Void Foo2(Int32, Int32 ByRef)">
+ <size>40</size>
+ </method>
+ <method name="Int32 Main()">
+ <size>239</size>
+ </method>
+ <method name="Void .ctor()">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="test-partial-01.cs">
<type name="Foo.Hello">
<method name="Void .ctor()">