[Issue 20399] opIn deprecation warning should point to where opIn is defined, not where it is used.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 6 19:35:12 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=20399

Steven Schveighoffer <schveiguy at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |schveiguy at yahoo.com
         Resolution|---                         |INVALID

--- Comment #3 from Steven Schveighoffer <schveiguy at yahoo.com> ---
This should be INVALID. Defining a function named opIn is not a deprecation.
This produces no deprecation warning:

struct S
{
  void opIn(int x) {}
}

void main()
{
   S s;
   s.opIn(5);
}

The deprecation is using that to define operator overloading. So it is pointing
at the correct location. The message may be awkward, but the location is
correct.

--


More information about the Digitalmars-d-bugs mailing list