2010-05-27 Marek Safar <marek.safar@gmail.com>
[mono.git] / mcs / tests / test-525.cs
1 using System;
2
3 class X {
4         ~X ()
5         {
6                 Console.WriteLine ("DESTRUCTOR!");
7         }
8
9         public static int Test1()
10         {
11                 try {
12                         return 8;
13                 } catch (Exception) {}  
14                 System.Console.WriteLine("Shouldn't get here");
15                 return 9;
16         }
17
18         public static void Test2()
19         {
20                 int[] vars = { 3, 4, 5 };
21
22                 foreach (int a in vars) {
23                         try {
24                                 continue;
25                         } catch (Exception) {
26                                 break;
27                         }
28                 }
29         }
30
31         public static void Main() {
32                 Test1 ();
33                 Test2 ();
34
35                 try {
36                         return;
37                 } catch (Exception) {}  
38                 System.Console.WriteLine("Shouldn't get here");
39                 return;
40         }
41 }