Updated with review feedback.
[mono.git] / mcs / tests / test-660.cs
1 using System;
2
3 using System.Linq.Expressions;
4
5 public enum Code
6 {
7         Opened = 0,
8         Closed = 1,
9         ReckonedUp = 2
10 }
11
12 public struct Status
13 {
14         Code value;
15
16         public Status (Code value)
17         {
18                 this.value = value;
19         }
20
21         public static implicit operator Status (Code x)
22         {
23                 return new Status (x);
24         }
25
26         public static implicit operator Code (Status x)
27         {
28                 return x.value;
29         }
30 }
31
32 public class Test
33 {
34         Status status;
35
36         public static void Main ()
37         {
38                 Test test = new Test ();
39
40                 if (test.status == Code.ReckonedUp) {
41                         return;
42                 }
43         }
44 }