Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / test-primary-ctor-02.cs
1 // Compiler options: -langversion:experimental
2 using System;
3
4 partial class Part
5 {
6         public Part (string s)
7                 : this (5)
8         {
9         }
10 }
11
12 partial class Part(int arg)
13 {
14         static int field = 7;
15
16         int Property { get; } = arg + field;
17
18         {
19                 if (arg != 5)
20                         throw new ApplicationException ("1");
21
22                 if (Property != 12)
23                         throw new ApplicationException ("2");
24         }
25
26         public static int Main ()
27         {
28                 var p = new Part ("5");
29                 if (p.Property != 12)
30                         return 1;
31
32                 return 0;
33         }
34 }