| 1 |
|
| 2 |
using System; |
| 3 |
|
| 4 |
struct S |
| 5 |
{ |
| 6 |
public static int P { get; } = 4; |
| 7 |
|
| 8 |
public static int[] PA { get; } = { 0, 2 }; |
| 9 |
|
| 10 |
public static int Main () |
| 11 |
{ |
| 12 |
if (P != 4) |
| 13 |
return 1; |
| 14 |
|
| 15 |
if (PA [1] != 2) |
| 16 |
return 10; |
| 17 |
|
| 18 |
var c = new C (); |
| 19 |
if (c.P != -3) |
| 20 |
return 2; |
| 21 |
|
| 22 |
if (c.P2 != 1) |
| 23 |
return 3; |
| 24 |
|
| 25 |
c.P2 = 9; |
| 26 |
if (c.P2 != 9) |
| 27 |
return 4; |
| 28 |
|
| 29 |
var s = new S2 (null); |
| 30 |
if (s.P != 4) |
| 31 |
return 12; |
| 32 |
|
| 33 |
if (s.P2 != 1) |
| 34 |
return 13; |
| 35 |
|
| 36 |
s.P2 = 9; |
| 37 |
if (s.P2 != 9) |
| 38 |
return 14; |
| 39 |
|
| 40 |
return 0; |
| 41 |
} |
| 42 |
} |
| 43 |
|
| 44 |
class C |
| 45 |
{ |
| 46 |
public decimal P { get; } = -3; |
| 47 |
public int P2 { get; set; } = 1; |
| 48 |
} |
| 49 |
|
| 50 |
struct S2 |
| 51 |
{ |
| 52 |
public int P { get; } = 4; |
| 53 |
public int P2 { get; set; } = 1; |
| 54 |
|
| 55 |
public S2 (object o) |
| 56 |
{ |
| 57 |
} |
| 58 |
} |