[mcs] Pending implementation of accessors cannot hide base implementation with differ...
[mono.git] / mcs / tests / test-687.cs
1 using System;
2
3 struct XUnit
4 {
5         public XUnit(double point)
6         {
7                 this.Point = point;
8         }
9
10         double Point;
11
12         public static implicit operator XUnit(double value)
13         {
14                 XUnit unit;
15                 unit.Point = value;
16                 return unit;
17         }
18
19         public static implicit operator double(XUnit value)
20         {
21                 return value.Point;
22         }
23 }
24
25 struct Unit
26 {
27         public Unit(double point)
28         {
29                 this.Point = point;
30         }
31
32         double Point;
33
34         public static implicit operator Unit(double value)
35         {
36                 Unit unit;
37                 unit.Point = value;
38                 return unit;
39         }
40
41         public static implicit operator double(Unit value)
42         {
43                 return value.Point;
44         }
45 }
46
47 class Test
48 {
49         public static int Main()
50         {
51                 XUnit xunit = new XUnit();
52                 Unit unit = new Unit();
53                 Unit uu = unit + xunit;
54                 unit += xunit;
55                 return 0;
56         }
57 }