* Makefile (run-test-local): Don't pick 'mono' from the path.
[mono.git] / mcs / tests / test-187.cs
index b85a66a670081756b7d2057c5060ba2eb10da2b2..ece3a82d4ef40ee89c42f05282d482abadf52cf6 100644 (file)
@@ -2,15 +2,46 @@
 // This test verifies that we resolve the source expression in a compound
 // expression before we attempt to use it.
 //
+// The test also attempts 
+//
 
 using System.Collections.Specialized;
 
+public class MyClass
+{
+       public Container this [ string s ]
+       {
+               get { return null; }
+               set { ; }
+       }               
+}
+
+
+public class Container
+{
+       public static Container operator + ( Container c, object o )
+       {
+               return c;
+       }       
+}
+
 class D {
-       static void A (NameValueCollection n)
+       static void A (NameValueCollection n, MyClass m, object o)
         {
+               //
+               // Tests that ";" is a StringLiteral, *and* it has been resolved.  Triggered
+               // by indexers, as indexers trigger an OverloadResolve.
+               //
                 n ["a"] += ";";
+
+               //
+               // A different, but similar beast.  A bug existed in the compiler that
+               // prevented the following from working (bug 36505)
+               //
+               m["apple"] += o;
         }
 
+       
        static int Main ()
        {
                return 0;