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:
authorRavi Pratap M <ravi@mono-cvs.ximian.com>2002-05-08 17:25:57 +0400
committerRavi Pratap M <ravi@mono-cvs.ximian.com>2002-05-08 17:25:57 +0400
commit4d9c0295d3e9d58328ce19a347dc08ec77f49638 (patch)
tree7e21d41e2bde8d1a329082d9cea06a5fdd10124c /mcs/tests/test-119.cs
parent9e63489461c89458c5793fd1b48040fdf2e4edba (diff)
Add.
svn path=/trunk/mcs/; revision=4417
Diffstat (limited to 'mcs/tests/test-119.cs')
-rw-r--r--mcs/tests/test-119.cs40
1 files changed, 40 insertions, 0 deletions
diff --git a/mcs/tests/test-119.cs b/mcs/tests/test-119.cs
new file mode 100644
index 00000000000..ad271f6ffe7
--- /dev/null
+++ b/mcs/tests/test-119.cs
@@ -0,0 +1,40 @@
+class Value {
+ public static explicit operator int (Value val)
+ {
+ return 1;
+ }
+
+ public static explicit operator MyObject (Value val)
+ {
+ return new MyObject (1);
+ }
+
+ public static explicit operator uint (Value val)
+ {
+ return 1;
+ }
+}
+
+class MyObject {
+ public MyObject (int i) {}
+}
+
+class Derived : MyObject {
+ public Derived (int i) : base (i) { }
+
+ Derived Blah ()
+ {
+ Value val = new Value ();
+
+ return (Derived) val;
+ }
+}
+
+class Test {
+ static void Main ()
+ {
+ Value v = new Value ();
+
+ Derived d = (Derived) v;
+ }
+}