blob: e5ce893eb424ca2f7c4fa943d17661032fe468f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
//
// 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;
}
}
|