cleol
[mcs.git] / tests / test-187.cs
blobece3a82d4ef40ee89c42f05282d482abadf52cf6
1 //
2 // This test verifies that we resolve the source expression in a compound
3 // expression before we attempt to use it.
4 //
5 // The test also attempts
6 //
8 using System.Collections.Specialized;
10 public class MyClass
12 public Container this [ string s ]
14 get { return null; }
15 set { ; }
20 public class Container
22 public static Container operator + ( Container c, object o )
24 return c;
28 class D {
29 static void A (NameValueCollection n, MyClass m, object o)
32 // Tests that ";" is a StringLiteral, *and* it has been resolved. Triggered
33 // by indexers, as indexers trigger an OverloadResolve.
35 n ["a"] += ";";
38 // A different, but similar beast. A bug existed in the compiler that
39 // prevented the following from working (bug 36505)
41 m["apple"] += o;
45 static int Main ()
47 return 0;