diff options
author | Marek Safar <marek.safar@gmail.com> | 2009-07-01 23:03:25 +0400 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2009-07-01 23:03:25 +0400 |
commit | cdb3c4dc2c243bd7e3da842260cce373bfe73076 (patch) | |
tree | 4ab0f1849852b2b53c4dae4205315984fcbed84a /mcs/errors | |
parent | 375230347978aba8e6726a2108cffcda42e6fba0 (diff) |
New tests.
svn path=/trunk/mcs/; revision=137212
Diffstat (limited to 'mcs/errors')
-rw-r--r-- | mcs/errors/gcs0065.cs | 12 | ||||
-rw-r--r-- | mcs/errors/gcs0069.cs | 14 |
2 files changed, 26 insertions, 0 deletions
diff --git a/mcs/errors/gcs0065.cs b/mcs/errors/gcs0065.cs new file mode 100644 index 00000000000..efb72438bba --- /dev/null +++ b/mcs/errors/gcs0065.cs @@ -0,0 +1,12 @@ +// CS0065: `EventClass<T>.handler': event property must have both add and remove accessors +// Line: 10 + +using System; + +public delegate void EventHandler (object sender, EventArgs e); + +public class EventClass<T> +{ + event EventHandler handler { add {} } +} + diff --git a/mcs/errors/gcs0069.cs b/mcs/errors/gcs0069.cs new file mode 100644 index 00000000000..b7ba89c7612 --- /dev/null +++ b/mcs/errors/gcs0069.cs @@ -0,0 +1,14 @@ +// CS0069: Event in interface cannot have add or remove accessors +// Line: 11 + +using System; + +public delegate void FooHandler (); + +interface IBar<T> +{ + event FooHandler OnFoo { + remove { } + } +} + |