Merge pull request #5636 from BrzVlad/fix-xmm-scan
[mono.git] / mcs / tests / test-581.cs
1 using System;
2
3 public class TestParams
4 {
5         object this [params string[] idx] {
6                 get {
7                         return idx[0];
8                 }
9                 set {
10                         Console.WriteLine (value);
11                         if ((string)value != "A(B)")
12                                 throw new ApplicationException (value.ToString ());
13                 }
14         }
15         
16         public void TestMethod ()
17         {
18                 this ["A"] += "(" + this ["B"] + ")";
19                 this [new string[] {"A"}] += "(" + this ["B"] + ")";
20         }
21 }
22
23 public class TestNonParams
24 {
25         object this [string idx] {
26                 get {
27                         return idx;
28                 }
29                 set {
30                         Console.WriteLine (value);
31                         if ((string)value != "A(B)")
32                                 throw new ApplicationException (value.ToString ());
33                 }
34         }
35         
36         public void TestMethod ()
37         {
38                 this ["A"] += "(" + this ["B"] + ")";
39         }
40 }
41
42 public class M
43 {
44         public static int Main()
45         {
46                 new TestNonParams().TestMethod ();
47                 new TestParams().TestMethod ();
48                 return 0;
49         }
50 }