Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2014-04-29 20:44:03 +0400
committerMarek Safar <marek.safar@gmail.com>2014-04-29 20:44:54 +0400
commit491da5c899e93625295c3cacd8ecaa26f997345d (patch)
tree6a270bf6ce71b474b5842d492f46b67ebf920ee4 /mcs/tests/test-276.cs
parent1dbd5e22fa7f7922ffc448a10bee2fb219fca154 (diff)
[mcs] Make unused event warning reporting consistent to csc. Fixes #19095
Diffstat (limited to 'mcs/tests/test-276.cs')
-rw-r--r--mcs/tests/test-276.cs25
1 files changed, 11 insertions, 14 deletions
diff --git a/mcs/tests/test-276.cs b/mcs/tests/test-276.cs
index a858dacd2f5..f56d84eb2c9 100644
--- a/mcs/tests/test-276.cs
+++ b/mcs/tests/test-276.cs
@@ -1,23 +1,20 @@
// Compiler options: -warnaserror -warn:4
using System;
-using System.Reflection;
+using System.Runtime.InteropServices;
-public class EventTestClass : IEventTest {
- public event EventHandler Elapsed; // No warning is reported
-}
+[StructLayout (LayoutKind.Sequential)]
+public class EventTestClass : IEventTest
+{
+ int i;
+ public event EventHandler Elapsed;
-public interface IEventTest {
- event EventHandler Elapsed;
+ public static void Main ()
+ {
+ }
}
-
-public class EntryPoint
+public interface IEventTest
{
- public static bool test (Type type) { return type.GetEvent ("Elapsed").IsSpecialName; }
- public static int Main ()
- {
- return (test (typeof (EventTestClass))
- || test (typeof (IEventTest))) ? 1 : 0;
- }
+ event EventHandler Elapsed;
}