Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

51 lines
885 B
C#

//
// 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, 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;
}
public static int Main ()
{
return 0;
}
}