2004-02-02 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mono / tests / static-constructor.cs
1
2 public class GenRandom {
3         static int last = 42;
4         static int burp;
5
6         static GenRandom () {
7                 /* 
8                  * This is really at test of the compiler: it should init
9                  * last before getting here.
10                 */
11                 if (last != 42)
12                         burp = 5;
13                 else
14                         burp = 4;
15         }
16         public static int Main() {
17                 if (last != 42)
18                         return 1;
19                 if (burp != 4)
20                         return 1;
21                 return 0;
22         }
23 }