Merge pull request #1896 from meum/patch-1
[mono.git] / mcs / errors / cs1918.cs
1 // CS1918: Members of value type `S' cannot be assigned using a property `C.Value' object initializer
2 // Line: 18
3
4
5 struct S
6 {
7         public int X;
8 }
9
10 class C
11 {
12         public S Value {
13                 set; get;
14         }
15
16         static void Main ()
17         {
18                 C c = new C { Value = { X = 2 } };
19         }
20 }