[Issue 3345] Static and nonstatic methods with the same name should be allowed

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jul 27 14:27:08 UTC 2021


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

Mike Parker <aldacron at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aldacron at gmail.com

--- Comment #5 from Mike Parker <aldacron at gmail.com> ---
This recently turned up from a user in Discord, affecting opCall:

struct S {

    void opCall(int x) {
    }

    static S opCall(int x) {
        return S.init;
    }
}

int main() {
    auto s = S(1);
    s(1);

    return 0;
}

--


More information about the Digitalmars-d-bugs mailing list