https://issues.dlang.org/show_bug.cgi?id=20399
Simen Kjaeraas <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED CC| |[email protected] Resolution|INVALID |--- --- Comment #4 from Simen Kjaeraas <[email protected]> --- You should only get the error if opIn is being used for operator overloading, yes. However, the error message should at the very least mention the location where opIn is defined, as that's where the code change will need to happen. We can expect that if someone tries to use opIn with operator overloading, opIn has been written with that in mind. Now, that means the error message should be fixed, such that this program struct S { void opIn(S s) { } } unittest { S s1, s2; s1 in s2; } gives this error message: foo.d(7) Deprecation: using opIn for operator overloading is deprecated. Call it as s1.opIn(s2) instead, or change the definition to opBinary(string op)(...) if (op == "in"). foo.d(2) opIn is defined here --
