Merge pull request #4431 from vkargov/vk-leaking-points
[mono.git] / mcs / tests / gtest-139.cs
1 using System;
2
3 public struct MyStruct
4 {
5         public static int operator !=(MyStruct? a, string b)
6         {
7                 return -1;
8         }
9         
10         public static int operator ==(MyStruct? a, string b)
11         {
12                 return 1;
13         }
14         
15         public static int operator !=(string a, MyStruct? b)
16         {
17                 return -2;
18         }
19         
20         public static int operator ==(string a, MyStruct? b)
21         {
22                 return 2;
23         }
24 }
25
26 public class Test
27 {
28         public static int Main()
29         {
30                 MyStruct? ms = new MyStruct ();
31                 int v;
32                 v = ms == "a";
33                 if (v != 1)
34                         return 1;
35                 
36                 v = "b" != ms;
37                 if (v != -2)
38                         return 2;
39                 
40                 return 0;
41         }
42 }