use MOONLIGHT symbol
[mcs.git] / tests / test-318.cs
blob71439f79faa9c237fcf1fbf76ce187a9f0dd10aa
1 // This code must be compilable without any warning
2 // Compiler options: -warnaserror -warn:4 -unsafe
3 // Test of wrong warnings
5 using System;
6 using System.ComponentModel;
8 public class Ev
10 object disposedEvent = new object ();
11 EventHandlerList Events = new EventHandlerList();
13 public event EventHandler Disposed
15 add { Events.AddHandler (disposedEvent, value); }
16 remove { Events.RemoveHandler (disposedEvent, value); }
19 public void OnClick(EventArgs e)
21 EventHandler clickEventDelegate = (EventHandler)Events[disposedEvent];
22 if (clickEventDelegate != null) {
23 clickEventDelegate(this, e);
28 public interface EventInterface {
29 event EventHandler Event;
32 class Foo : EventInterface {
33 event EventHandler EventInterface.Event
35 add { }
36 remove { }
40 public class C {
42 public static void my_from_fixed(out int val)
44 val = 3;
47 public static void month_from_fixed(int date)
49 int year;
50 my_from_fixed(out year);
53 internal static int CreateFromString (int arg)
55 int major = 0;
56 int number = 5;
58 major = number;
59 number = -1;
61 return major;
64 public unsafe double* GetValue (double value)
66 double d = value;
67 return &d;
70 public static void Main () {