Thread overview
[Issue 21787] Operator Overload by a Variable not detected
Apr 01, 2021
Manfred Nowak
Dec 17, 2022
Iain Buclaw
April 01, 2021
https://issues.dlang.org/show_bug.cgi?id=21787

Manfred Nowak <svv1999@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

--- Comment #1 from Manfred Nowak <svv1999@hotmail.com> ---
Specs.20.8|1 require `opIndex` to be a method. Therefore this is not a bug, but an enhancement.

Although that requirement can be satisfied by declaring

  class C{
    bool delegate( int) opIndexVar;
    bool opIndex( int arg){
      return opIndexVar( arg);
    }
  }

the result would be an additional call unless the machine code generator optimizes that call away.

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=21787

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P4

--
December 13
https://issues.dlang.org/show_bug.cgi?id=21787

--- Comment #2 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/19902

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--