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