using System; public struct S{ public static S operator +(bool? b, S y) { return new S(); } public static S operator +(S x) { return new S(); } } public class Test { public static void Main() { // the trick is to use the fact that the operator + // is both unary and binary. var o = 1 is bool? +new S() is int ? null : default(bool?); var p = 1 is bool? +new S() is int ? : default(bool?); } }