diff options
author | Marek Safar <marek.safar@gmail.com> | 2009-12-01 17:08:12 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2009-12-01 17:08:12 +0300 |
commit | 3e7d915f3ae15543aeb10065b726e3d29a58c7e8 (patch) | |
tree | de8b89177634a8c39506ab69d9d2436cd47da80c /mcs/tests/test-736.cs | |
parent | 1676510ebe617b0ca1dbe06bb590490a65306fd5 (diff) |
New tests.
svn path=/trunk/mcs/; revision=147228
Diffstat (limited to 'mcs/tests/test-736.cs')
-rw-r--r-- | mcs/tests/test-736.cs | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/mcs/tests/test-736.cs b/mcs/tests/test-736.cs new file mode 100644 index 00000000000..0813d2935e2 --- /dev/null +++ b/mcs/tests/test-736.cs @@ -0,0 +1,45 @@ +// 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 () + { + } +} + |