Move Enum and CorElementType to shared (dotnet/coreclr#23177)
[mono-project.git] / mcs / tests / test-187.cs
blobe5ce893eb424ca2f7c4fa943d17661032fe468f3
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 public static int Main ()
47 return 0;