Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

46 lines
740 B
C#

// 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 ()
{
}
}