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:
Diffstat (limited to 'mcs/tests/test-16.cs')
-rw-r--r--mcs/tests/test-16.cs61
1 files changed, 0 insertions, 61 deletions
diff --git a/mcs/tests/test-16.cs b/mcs/tests/test-16.cs
deleted file mode 100644
index 3c59e917e19..00000000000
--- a/mcs/tests/test-16.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-using System;
-
-namespace Mine {
-
- public class Blah {
-
- public static int operator + (Blah i, Blah j)
- {
- Console.WriteLine ("Base class binary + operator");
- return 2;
- }
-
- public static implicit operator int (Blah i)
- {
- Console.WriteLine ("Blah->int");
- return 3;
- }
-
- public static implicit operator byte (Blah i)
- {
- Console.WriteLine ("Blah->byte");
- return 0;
- }
-
- public static implicit operator short (Blah i)
- {
- Console.WriteLine ("Blah->short");
- return 1;
- }
-
- }
-
- public class Foo : Blah {
-
- public static int Main ()
- {
- int number = new Foo () + new Foo () ;
- Console.WriteLine (number);
-
- Foo tmp = new Foo ();
-
- int k = tmp;
-
- Console.WriteLine ("Convert from Foo to float");
- float f = tmp;
- Console.WriteLine ("Converted");
-
- // The following will not work till we fix our UserCast::Emit
- // to convert the return value on the stack.
- if (f == 3)
- Console.WriteLine ("Best implicit conversion selected correctly.");
-
- Console.WriteLine ("F is {0}", f);
-
- if (number == 2 && k == 3)
- return 0;
- else
- return 1;
- }
- }
-}