Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / test-285.cs
1 class Test
2 {
3         static int test1 ()
4         {
5                 var s = "Nice";
6                 switch (s) {
7                 case "HI":
8                         const string x = "Nice";
9                         return 1;
10                 case x:
11                         return 2;
12                 }
13
14                 return 3;
15         }
16
17         public const string xx = "Not";
18         static int test2 ()
19         {
20                 var s = "Nice";
21                 switch (s) {
22                 case "HI":
23                         const string xx = "Nice";
24                         return 1;
25                 case xx:
26                         return 2;
27                 }
28
29                 return 3;
30         }
31
32         static int Main ()
33         {
34                 if (test1 () != 2)
35                         return 1;
36
37                 if (test2 () != 2)
38                         return 2;
39
40                 return 0;
41         }
42 }