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>2002-11-17 19:34:42 +0300
committerMartin Baulig <martin@novell.com>2002-11-17 19:34:42 +0300
commit4d03d4a538b32bd4aa6b0ed7ee59329db12ba99b (patch)
tree8d5d044e32b4e4f5230ee7c9d1b364506582f24f /mcs/tests/test-173.cs
parent698428585ed142dfd2cf83af18bbfae291244192 (diff)
Added two more testcases.
svn path=/trunk/mcs/; revision=9029
Diffstat (limited to 'mcs/tests/test-173.cs')
-rw-r--r--mcs/tests/test-173.cs50
1 files changed, 50 insertions, 0 deletions
diff --git a/mcs/tests/test-173.cs b/mcs/tests/test-173.cs
index 5300df58e77..0484578d1dc 100644
--- a/mcs/tests/test-173.cs
+++ b/mcs/tests/test-173.cs
@@ -74,6 +74,46 @@ class D : Base
}
}
+class E : Base
+{
+ public E (long value)
+ : base (9)
+ {
+ Console.WriteLine ("Long");
+ }
+
+ public E (E e)
+ : base (10)
+ {
+ Console.WriteLine ("E");
+ }
+
+ public static implicit operator E (long value)
+ {
+ return (new E (value));
+ }
+}
+
+class F : Base
+{
+ public F (int value)
+ : base (11)
+ {
+ Console.WriteLine ("Int");
+ }
+
+ public F (F f)
+ : base (12)
+ {
+ Console.WriteLine ("F");
+ }
+
+ public static implicit operator F (int value)
+ {
+ return (new F (value));
+ }
+}
+
class X
{
static int Test ()
@@ -114,6 +154,16 @@ class X
return 8;
}
+ {
+ E e = new E (4);
+ if (e.Value != 9)
+ return 9;
+
+ F f = new F (4);
+ if (f.Value != 11)
+ return 10;
+ }
+
return 0;
}