Merge pull request #5198 from BrzVlad/fix-binprot-stats
[mono.git] / mcs / tests / gtest-640.cs
1 using System;
2
3 public struct Test
4 {
5         public static Test op_Addition<T>(Test p1, T p2)
6         {
7                 throw new ApplicationException ();
8         }
9
10         public static int op_Addition<T>(T p1, int p2)
11         {
12                 throw new ApplicationException ();
13         }
14
15         public static Test operator +(Test p1, Test p2)
16         {
17                 throw new ApplicationException ();
18         }
19
20         public static long operator +(Test p1, int p2)
21         {
22                 return 4;
23         }
24 }
25
26 public class Program
27 {
28         public static int Main ()
29         {
30                 var t = new Test ();
31
32                 int p2 = 20;
33                 var res = t + p2;
34                 if (res != 4)
35                         return 1;
36
37                 return 0;
38         }
39 }