Clone shared members list before operators merging. Fixes #10967
[mono.git] / mcs / tests / test-866.cs
diff --git a/mcs/tests/test-866.cs b/mcs/tests/test-866.cs
new file mode 100644 (file)
index 0000000..723795e
--- /dev/null
@@ -0,0 +1,30 @@
+class C : B
+{
+       public static bool operator + (C a, short b)
+       {
+               return false;
+       }
+
+       public static bool operator + (C a, long b)
+       {
+               return false;
+       }
+}
+
+class B
+{
+       public static bool operator + (B b, string s)
+       {
+               return false;
+       }
+}
+
+public class Test
+{
+       public static void Main ()
+       {
+               var c = new C ();
+               var a1 = c + "a";
+               var a2 = c + "a";
+       }
+}
\ No newline at end of file