2006-12-05 Chris Toshok <toshok@ximian.com>
[mcs.git] / tests / test-318.cs
blob83bcdfabef03f9e0be5307c518ff94319dc4e857
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 class C {
30 public static void my_from_fixed(out int val)
32 val = 3;
35 public static void month_from_fixed(int date)
37 int year;
38 my_from_fixed(out year);
41 internal static int CreateFromString (int arg)
43 int major = 0;
44 int number = 5;
46 major = number;
47 number = -1;
49 return major;
52 public unsafe double* GetValue (double value)
54 double d = value;
55 return &d;
58 public static void Main () {