New test.
[mono.git] / mcs / tests / test-partial-10.cs
1 // Compiler options: -langversion:default\r
2 \r
3 using System;\r
4 \r
5 namespace Test2\r
6 {\r
7         public interface Base\r
8         { }\r
9 \r
10         public partial class Foo : Base\r
11         {\r
12                 public static int f = 10;\r
13         }\r
14 \r
15         public partial class Foo : Base\r
16         {\r
17                 public static int f2 = 9;               \r
18         }\r
19 }\r
20 \r
21 namespace Test3\r
22 {\r
23         public interface Base\r
24         { }\r
25 \r
26         public partial struct Foo : Base\r
27         {\r
28                 public static int f = 10;\r
29         }\r
30 \r
31         public partial struct Foo : Base\r
32         {\r
33                 public static int f2 = 9;\r
34         }\r
35 }\r
36 \r
37 class X\r
38 {\r
39         static int Main ()\r
40         {\r
41                 if (Test2.Foo.f != 10)\r
42                         return 1;\r
43                 \r
44                 if (Test2.Foo.f2 != 9)\r
45                         return 1;\r
46                 \r
47                 if (Test3.Foo.f != 10)\r
48                         return 1;\r
49 \r
50                 if (Test3.Foo.f2 != 9)\r
51                         return 1;\r
52                 \r
53                 Console.WriteLine ("OK");\r
54                 return 0;\r
55         }\r
56 }\r