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/errors/cs0172.cs')
-rwxr-xr-xmcs/errors/cs0172.cs25
1 files changed, 25 insertions, 0 deletions
diff --git a/mcs/errors/cs0172.cs b/mcs/errors/cs0172.cs
new file mode 100755
index 00000000000..2ae816f8eb5
--- /dev/null
+++ b/mcs/errors/cs0172.cs
@@ -0,0 +1,25 @@
+class X {
+ public static implicit operator X (Y y)
+ {
+ return null;
+ }
+}
+
+class Y {
+ public static implicit operator Y (X x)
+ {
+ return null;
+ }
+}
+
+class Z
+{
+ static void Main ()
+ {
+ X x = new X ();
+ Y y = new Y ();
+
+ object d = (x == x) ? x : y;
+ }
+
+}