Move Enum and CorElementType to shared (dotnet/coreclr#23177)
[mono-project.git] / mcs / tests / test-211.cs
blob81eecb75f647f862e5bbcd19e8b990c59811c80e
1 class X
3 public readonly int value;
5 public X (int value)
7 this.value = value;
10 public static implicit operator X (int y)
12 return new X (y);
16 class Y
18 public readonly X x;
20 public Y (X x)
22 this.x = x;
25 public static implicit operator Y (X x)
27 return new Y (x);
31 class Z
33 public readonly Y y;
35 public Z (Y y)
37 this.y = y;
40 public static implicit operator Z (Y y)
42 return new Z (y);
45 public static int Main ()
47 int a = 5;
48 Y y = (Y) (X) a;
50 //.
51 // Compile this:
54 int b = (System.Int32)int.Parse ("1");
55 return 0;