2005-01-31 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mcs / tests / test-318.cs
1 // This code must be compilable without any warning
2 // Compiler options: -warnaserror -warn:4 -unsafe
3 // Test of wrong warnings
4 \r
5 using System;\r
6 using System.ComponentModel;\r
7 \r
8 public class Ev\r
9 {\r
10         object disposedEvent = new object ();\r
11         EventHandlerList Events = new EventHandlerList();
12                 \r
13         public event EventHandler Disposed
14         {
15                 add { Events.AddHandler (disposedEvent, value); }
16                 remove { Events.RemoveHandler (disposedEvent, value); }
17         }\r
18 \r
19         public void OnClick(EventArgs e)\r
20         {\r
21             EventHandler clickEventDelegate = (EventHandler)Events[disposedEvent];\r
22             if (clickEventDelegate != null) {\r
23                 clickEventDelegate(this, e);\r
24             }\r
25         }\r
26 }\r
27
28 public class C {
29     
30         public static void my_from_fixed(out int val)
31         {
32                 val = 3;
33         }
34         
35         public static void month_from_fixed(int date)
36         {
37                 int year;
38                 my_from_fixed(out year);
39         }
40         
41         internal static int CreateFromString (int arg)
42         {
43                 int major = 0;
44                 int number = 5;
45
46                 major = number;
47                 number = -1;
48                     
49                 return major;
50         }   
51         
52         public unsafe double* GetValue (double value)
53         {
54                 double d = value;
55                 return &d;
56         }        
57         
58         public static void Main () {
59         }
60 }