5 fail_compilation/dep_d1_ops.d(105): Error: `opAdd` is obsolete. Use `opBinary(string op)(...) if (op == "+")` instead.
6 fail_compilation/dep_d1_ops.d(106): Error: `opAdd_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == "+")` instead.
7 fail_compilation/dep_d1_ops.d(107): Error: `opSub` is obsolete. Use `opBinary(string op)(...) if (op == "-")` instead.
8 fail_compilation/dep_d1_ops.d(108): Error: `opSub_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == "-")` instead.
9 fail_compilation/dep_d1_ops.d(109): Error: `opMul` is obsolete. Use `opBinary(string op)(...) if (op == "*")` instead.
10 fail_compilation/dep_d1_ops.d(110): Error: `opMul_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == "*")` instead.
11 fail_compilation/dep_d1_ops.d(111): Error: `opDiv` is obsolete. Use `opBinary(string op)(...) if (op == "/")` instead.
12 fail_compilation/dep_d1_ops.d(112): Error: `opDiv_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == "/")` instead.
13 fail_compilation/dep_d1_ops.d(113): Error: `opMod` is obsolete. Use `opBinary(string op)(...) if (op == "%")` instead.
14 fail_compilation/dep_d1_ops.d(114): Error: `opMod_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == "%")` instead.
15 fail_compilation/dep_d1_ops.d(116): Error: `opAnd` is obsolete. Use `opBinary(string op)(...) if (op == "&")` instead.
16 fail_compilation/dep_d1_ops.d(117): Error: `opOr` is obsolete. Use `opBinary(string op)(...) if (op == "|")` instead.
17 fail_compilation/dep_d1_ops.d(118): Error: `opXor` is obsolete. Use `opBinary(string op)(...) if (op == "^")` instead.
18 fail_compilation/dep_d1_ops.d(120): Error: `opShl` is obsolete. Use `opBinary(string op)(...) if (op == "<<")` instead.
19 fail_compilation/dep_d1_ops.d(121): Error: `opShl_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == "<<")` instead.
20 fail_compilation/dep_d1_ops.d(122): Error: `opShr` is obsolete. Use `opBinary(string op)(...) if (op == ">>")` instead.
21 fail_compilation/dep_d1_ops.d(123): Error: `opShr_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == ">>")` instead.
22 fail_compilation/dep_d1_ops.d(124): Error: `opUShr` is obsolete. Use `opBinary(string op)(...) if (op == ">>>")` instead.
23 fail_compilation/dep_d1_ops.d(125): Error: `opUShr_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == ">>>")` instead.
24 fail_compilation/dep_d1_ops.d(127): Error: `opCat` is obsolete. Use `opBinary(string op)(...) if (op == "~")` instead.
25 fail_compilation/dep_d1_ops.d(128): Error: `opCat_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == "~")` instead.
26 fail_compilation/dep_d1_ops.d(130): Error: `opNeg` is obsolete. Use `opUnary(string op)() if (op == "-")` instead.
27 fail_compilation/dep_d1_ops.d(131): Error: `opCom` is obsolete. Use `opUnary(string op)() if (op == "~")` instead.
28 fail_compilation/dep_d1_ops.d(132): Error: `opPostInc` is obsolete. Use `opUnary(string op)() if (op == "++")` instead.
29 fail_compilation/dep_d1_ops.d(133): Error: `opPostDec` is obsolete. Use `opUnary(string op)() if (op == "--")` instead.
30 fail_compilation/dep_d1_ops.d(134): Error: `opStar` is obsolete. Use `opUnary(string op)() if (op == "*")` instead.
31 fail_compilation/dep_d1_ops.d(136): Error: `opIn` is obsolete. Use `opBinary(string op)(...) if (op == "in")` instead.
32 fail_compilation/dep_d1_ops.d(137): Error: `opIn_r` is obsolete. Use `opBinaryRight(string op)(...) if (op == "in")` instead.
33 fail_compilation/dep_d1_ops.d(139): Error: `opAddAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "+")` instead.
34 fail_compilation/dep_d1_ops.d(140): Error: `opSubAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "-")` instead.
35 fail_compilation/dep_d1_ops.d(141): Error: `opMulAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "*")` instead.
36 fail_compilation/dep_d1_ops.d(142): Error: `opDivAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "/")` instead.
37 fail_compilation/dep_d1_ops.d(143): Error: `opModAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "%")` instead.
38 fail_compilation/dep_d1_ops.d(144): Error: `opAndAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "&")` instead.
39 fail_compilation/dep_d1_ops.d(145): Error: `opOrAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "|")` instead.
40 fail_compilation/dep_d1_ops.d(146): Error: `opXorAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "^")` instead.
41 fail_compilation/dep_d1_ops.d(147): Error: `opShlAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "<<")` instead.
42 fail_compilation/dep_d1_ops.d(148): Error: `opShrAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == ">>")` instead.
43 fail_compilation/dep_d1_ops.d(149): Error: `opUShrAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == ">>>")` instead.
44 fail_compilation/dep_d1_ops.d(150): Error: `opCatAssign` is obsolete. Use `opOpAssign(string op)(...) if (op == "~")` instead.
45 fail_compilation/dep_d1_ops.d(158): Error: `opCom` is obsolete. Use `opUnary(string op)() if (op == "~")` instead.
52 int opAdd(int i
) { return 0; }
53 int opAdd_r(int i
) { return 0; }
54 int opSub(int i
) { return 0; }
55 int opSub_r(int i
) { return 0; }
56 int opMul(int i
) { return 0; }
57 int opMul_r(int i
) { return 0; }
58 int opDiv(int i
) { return 0; }
59 int opDiv_r(int i
) { return 0; }
60 int opMod(int i
) { return 0; }
61 int opMod_r(int i
) { return 0; }
63 int opAnd(int i
) { return 0; }
64 int opOr(int i
) { return 0; }
65 int opXor(int i
) { return 0; }
67 int opShl(int i
) { return 0; }
68 int opShl_r(int i
) { return 0; }
69 int opShr(int i
) { return 0; }
70 int opShr_r(int i
) { return 0; }
71 int opUShr(int i
) { return 0; }
72 int opUShr_r(int i
) { return 0; }
74 int opCat(int i
) { return 0; }
75 int opCat_r(int i
) { return 0; }
77 int opNeg() { return 0; }
78 int opCom() { return 0; }
79 int opPostInc() { return 0; }
80 int opPostDec() { return 0; }
81 int opStar() { return 0; }
83 int opIn(int i
) { return 0; }
84 int opIn_r(int i
) { return 0; }
86 int opAddAssign(int i
) { return 0; }
87 int opSubAssign(int i
) { return 0; }
88 int opMulAssign(int i
) { return 0; }
89 int opDivAssign(int i
) { return 0; }
90 int opModAssign(int i
) { return 0; }
91 int opAndAssign(int i
) { return 0; }
92 int opOrAssign(int i
) { return 0; }
93 int opXorAssign(int i
) { return 0; }
94 int opShlAssign(int i
) { return 0; }
95 int opShrAssign(int i
) { return 0; }
96 int opUShrAssign(int i
) { return 0; }
97 int opCatAssign(int i
) { return 0; }
152 scope nd
= new NoDeprecation
;
153 assert((42 in nd
) == 0);
154 assert((nd
in 42) == 0);
155 assert((nd
~ 42) == 0);
156 assert((42 ~ nd
) == 0);
161 /// See https://github.com/dlang/dmd/pull/10716
164 int opIn(int i
) { return 0; }
165 int opIn_r(int i
) { return 0; }
166 int opCat(int i
) { return 0; }
167 int opCat_r(int i
) { return 0; }
169 /// This is considered because there is no `opUnary`
170 /// However, the other overloads (`opBinary` / `opBinaryRight`)
171 /// means that other operator overloads would not be considered.
172 int opCom() { return 0; }
174 int opBinary(string op
)(int arg
)
175 if (op
== "in" || op
== "~")
177 static if (op
== "in")
178 return this.opIn(arg
);
179 else static if (op
== "~")
180 return this.opCat(arg
);
183 int opBinaryRight(string op
)(int arg
)
184 if (op
== "in" || op
== "~")
186 static if (op
== "in")
187 return this.opIn_r(arg
);
188 else static if (op
== "~")
189 return this.opCat_r(arg
);