diff options
author | Marek Safar <marek.safar@gmail.com> | 2009-05-21 15:59:56 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2009-05-21 15:59:56 +0400 |
commit | b87de8b6f1c716236159c80ab1cbbf3efe8174a0 (patch) | |
tree | f37f85fafb1b6fbba203c6b6630937c24c98ee75 /mcs/tests/test-720.cs | |
parent | f18795cd19f0978f7fcbe3e95137740369025484 (diff) |
New test.
svn path=/trunk/mcs/; revision=134527
Diffstat (limited to 'mcs/tests/test-720.cs')
-rw-r--r-- | mcs/tests/test-720.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/mcs/tests/test-720.cs b/mcs/tests/test-720.cs new file mode 100644 index 00000000000..f85a91b2e6a --- /dev/null +++ b/mcs/tests/test-720.cs @@ -0,0 +1,30 @@ +// Compiler options: -warn:4 -warnaserror + +using System; + +namespace N +{ + class Program + { + static void Main () + { + Parent pr = new Child(); + ((Child)pr).OnExample(); + } + } + + public abstract class Parent + { + public delegate void ExampleHandler(); + public abstract event ExampleHandler Example; + } + + public class Child : Parent + { + public override event ExampleHandler Example; + public void OnExample() + { + if (Example != null) Example(); + } + } +} |