[interp] Reduce computation under calc_section mutex
[mono-project.git] / mcs / tests / test-primary-ctor-07.cs
blob79a1c2991e7de9b8303f427583b1dc319c527c1a
1 // Compiler options: -langversion:experimental
3 using System;
5 struct S (int x)
7 public int y = x;
9 public S (char x)
10 : this (1)
14 static S ()
19 struct S2 (int arg)
21 public readonly int v = arg;
24 struct S3 (string s = "arg")
26 public readonly string V2 = s;
28 public S3 (int i, string s = "arg2")
29 : this (s)
34 class X
36 public static int Main ()
38 if (new S (-5).y != -5)
39 return 1;
41 if (new S ('x').y != 1)
42 return 2;
44 if (new S2 (2).v != 2)
45 return 3;
47 if (new S3 ("x").V2 != "x")
48 return 4;
50 if (new S3 (0).V2 != "arg2")
51 return 5;
53 return 0;