Merge pull request #4202 from marek-safar/compression
[mono-project.git] / mcs / errors / cs0218.cs
blob3451e3fc4280c60f1f90c4e51e4644157f9d3ef8
1 // CS0218: The type `UserOperatorClass' must have operator `true' and operator `false' defined when `UserOperatorClass.operator &(UserOperatorClass, UserOperatorClass)' is used as a short circuit operator
2 // Line: 22
4 public class UserOperatorClass
6 public static UserOperatorClass operator & (UserOperatorClass u1, UserOperatorClass u2) {
7 return new UserOperatorClass();
10 // public static bool operator true (UserOperatorClass u) {
11 // return true;
12 // }
14 // public static bool operator false (UserOperatorClass u) {
15 // return false;
16 // }
18 public static void Main() {
20 UserOperatorClass x = new UserOperatorClass();
21 UserOperatorClass y = new UserOperatorClass();
22 UserOperatorClass z = x && y;