Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Baulig <martin@novell.com>2003-07-28 21:29:29 +0400
committerMartin Baulig <martin@novell.com>2003-07-28 21:29:29 +0400
commite2cbdf5c45bd4534eeca9bca18c3a4d8b5c3728f (patch)
treefee0a8fb46ca9f24aeb2e6d4fbbd393578692a0b /mcs/tests/test-211.cs
parent345db95ffa32b833c2d159eb332cf6c7de3d176f (diff)
New test.
svn path=/trunk/mcs/; revision=16777
Diffstat (limited to 'mcs/tests/test-211.cs')
-rw-r--r--mcs/tests/test-211.cs51
1 files changed, 51 insertions, 0 deletions
diff --git a/mcs/tests/test-211.cs b/mcs/tests/test-211.cs
new file mode 100644
index 00000000000..f5942c40c7c
--- /dev/null
+++ b/mcs/tests/test-211.cs
@@ -0,0 +1,51 @@
+class X
+{
+ public readonly int value;
+
+ public X (int value)
+ {
+ this.value = value;
+ }
+
+ public static implicit operator X (int y)
+ {
+ return new X (y);
+ }
+}
+
+class Y
+{
+ public readonly X x;
+
+ public Y (X x)
+ {
+ this.x = x;
+ }
+
+ public static implicit operator Y (X x)
+ {
+ return new Y (x);
+ }
+}
+
+class Z
+{
+ public readonly Y y;
+
+ public Z (Y y)
+ {
+ this.y = y;
+ }
+
+ public static implicit operator Z (Y y)
+ {
+ return new Z (y);
+ }
+
+ public static int Main ()
+ {
+ int a = 5;
+ Y y = (Y) (X) a;
+ return 0;
+ }
+}