"disable_omit_fp" can now be included in MONO_DEBUG
[mono-project.git] / mcs / tests / test-581.cs
blobcc0a542aa1c4218a38dbb87e4608f142eed103f9
1 using System;
3 public class TestParams
5 object this [params string[] idx] {
6 get {
7 return idx[0];
9 set {
10 Console.WriteLine (value);
11 if ((string)value != "A(B)")
12 throw new ApplicationException (value.ToString ());
16 public void TestMethod ()
18 this ["A"] += "(" + this ["B"] + ")";
19 this [new string[] {"A"}] += "(" + this ["B"] + ")";
23 public class TestNonParams
25 object this [string idx] {
26 get {
27 return idx;
29 set {
30 Console.WriteLine (value);
31 if ((string)value != "A(B)")
32 throw new ApplicationException (value.ToString ());
36 public void TestMethod ()
38 this ["A"] += "(" + this ["B"] + ")";
42 public class M
44 public static int Main()
46 new TestNonParams().TestMethod ();
47 new TestParams().TestMethod ();
48 return 0;