Merge pull request #5714 from alexischr/update_bockbuild
[mono.git] / mcs / tests / test-841.cs
1 struct S
2 {
3         public R a, b;
4 }
5
6 struct R
7 {
8         public double v;
9         
10         public static implicit operator R (int v)
11         {
12                 return new R ();
13         }
14         
15         public static implicit operator double (R r)
16         {
17                 return r.v;
18         }
19 }
20
21 class C
22 {
23         public static int Main ()
24         {
25                 S r1, r2;
26                 r1.a = 1;
27                 r1.b = 2;
28                 
29                 r2.a = 1;
30                 r2.b = 2;
31                 
32                 bool b = r1.a == r2.a && r1.b == r2.b;
33                 if (!b)
34                         return 1;
35                 return 0;
36         }
37 }