2010-05-27 Jb Evain <jbevain@novell.com>
[mcs.git] / errors / cs0217-2.cs
blob1902e6b5904dd8f5b4d159c19a1267df74dc0e86
1 // CS0217: A user-defined operator `UserOperatorClass.operator &(UserOperatorClass, bool)' must have parameters and return values of the same type in order to be applicable as a short circuit operator
2 // Line: 25
4 public class UserOperatorClass
6 public static UserOperatorClass operator & (UserOperatorClass u1, bool u2)
8 return u1;
11 public static bool operator true (UserOperatorClass u)
13 return true;
16 public static bool operator false (UserOperatorClass u)
18 return false;
21 public static void Main ()
23 UserOperatorClass x = new UserOperatorClass ();
24 bool y = true;
25 UserOperatorClass z = x && y;