[runtime] Synthesize IList and IReadOnlyList for the element type of enum errays...
[mono.git] / mono / tests / test-dup-mp.cs
1 /* This class works fine */
2 public class Works {
3
4     private double val;
5
6     public double this[int i, int j] {
7
8         get { return val; }
9
10         set { val = value; }
11
12     }
13
14     public Works(double val)
15     { this.val = val; }
16
17 }
18
19 /* Same code as struct breaks */
20
21 public struct Breaks {
22
23     private double val;
24
25     public double this[int i, int j] {
26
27         get { return val; }
28
29         set { val = value; }
30
31     }
32
33     public Breaks(double val)
34     { this.val = val; }
35
36 }
37
38 public class Tester {
39
40     public static void Main(string[] args)
41
42     {
43
44         System.Console.WriteLine("This works");
45
46         Works w = new Works(3.0);
47
48         w[0, 0] += 3.0;
49
50         System.Console.WriteLine("This breaks");
51
52         Breaks b = new Breaks(3.0);
53
54         b[0, 0] += 3.0;
55
56     }
57
58 }