November 06, 2015
https://issues.dlang.org/show_bug.cgi?id=13009

--- Comment #18 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/6115e5ed464f2902d60711c36a179d960abeb09b fix Issue 13009 more

There was a function declaration order dependent bug in `overloadModMatch`.

https://github.com/D-Programming-Language/dmd/commit/575ac488b5f6e040d14ad490a67ecfe57c17ea0f Merge pull request #5259 from 9rnsr/fix13009

[REG2.064] fix Issue 13009 more

--
November 06, 2015
https://issues.dlang.org/show_bug.cgi?id=13009

github-bugzilla@puremagic.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--
January 03, 2016
https://issues.dlang.org/show_bug.cgi?id=13009

--- Comment #19 from github-bugzilla@puremagic.com ---
Commits pushed to stable at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/6115e5ed464f2902d60711c36a179d960abeb09b fix Issue 13009 more

https://github.com/D-Programming-Language/dmd/commit/575ac488b5f6e040d14ad490a67ecfe57c17ea0f Merge pull request #5259 from 9rnsr/fix13009

--
January 29, 2017
https://issues.dlang.org/show_bug.cgi?id=13009

bitwise <nicolas.jinchereau@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
                 CC|                            |nicolas.jinchereau@gmail.co
                   |                            |m
         Resolution|FIXED                       |---

--- Comment #20 from bitwise <nicolas.jinchereau@gmail.com> ---
Getting this in DMD 2.073.0:


struct S {
    struct Payload {
        int[] data;
    }

    RefCounted!(Payload, RefCountedAutoInitialize.yes) payload;
    alias X = typeof(payload.data[0]);
}

int main(string[] argv) {
    return 0;
}


main.d(196): Error: std.typecons.RefCounted!(Payload,
cast(RefCountedAutoInitialize)1).RefCounted.refCountedPayload called with
argument types () matches both:
typecons.d(5241):     std.typecons.RefCounted!(Payload,
cast(RefCountedAutoInitialize)1).RefCounted.refCountedPayload()
and:
typecons.d(5233):     std.typecons.RefCounted!(Payload,
cast(RefCountedAutoInitialize)1).RefCounted.refCountedPayload()

--
July 19, 2017
https://issues.dlang.org/show_bug.cgi?id=13009

--- Comment #21 from github-bugzilla@puremagic.com ---
Commits pushed to dmd-cxx at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/b4f6725e3c94c302d5b161a6d7f8dff271cb8f64 fix Issue 13009 - inout overload conflicts with non-inout when used via alias this

https://github.com/dlang/dmd/commit/d30acc5d9c4a626711c3462ff3d42b9f105cd169 Merge pull request #4417 from 9rnsr/fix13009

--
December 21, 2018
https://issues.dlang.org/show_bug.cgi?id=13009

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com

--- Comment #22 from Walter Bright <bugzilla@digitalmars.com> ---
(In reply to bitwise from comment #20)
> Getting this in DMD 2.073.0:
> [...]

Please use complete examples. Guessing at what is missing may miss what is actually wrong, and in any case consumes much extra time.

--
December 22, 2018
https://issues.dlang.org/show_bug.cgi?id=13009

--- Comment #23 from bitwise <nicolas.jinchereau@gmail.com> ---
(In reply to Walter Bright from comment #22)
> (In reply to bitwise from comment #20)
> > Getting this in DMD 2.073.0:
> > [...]
> 
> Please use complete examples. Guessing at what is missing may miss what is actually wrong, and in any case consumes much extra time.

Sorry, do you mean the import statements?

I added them and tried DMD 2.083.1, but I'm getting a different error:

```
import std.typecons;

struct S {
    struct Payload {
        int[] data;
    }

    RefCounted!(Payload, RefCountedAutoInitialize.yes) payload;
    alias X = typeof(payload.data[0]);

    void foo() {
        payload.data[0] = 0;
    }
}

int main(string[] argv) {
    return 0;
}
```

> Error: no property data for type RefCounted!(Payload, cast(RefCountedAutoInitialize)1)

But alias this is there:

https://github.com/dlang/phobos/blob/e87b111162df48db747d535715817a37cefba6b1/std/typecons.d#L6308

It's been a while since I've used D, but as far as I can tell that code should compile. The presence of S.foo does not affect compilation either.

--
February 12, 2020
https://issues.dlang.org/show_bug.cgi?id=13009

--- Comment #24 from Walter Bright <bugzilla@digitalmars.com> ---
If you can get a test case without imports that is complete, that would be appreciated.

--
February 12, 2020
https://issues.dlang.org/show_bug.cgi?id=13009

--- Comment #25 from Vladimir Panteleev <dlang-bugzilla@thecybershadow.net> ---
(In reply to Walter Bright from comment #24)
> If you can get a test case without imports that is complete, that would be appreciated.

///////////////// test.d /////////////////
struct RefCounted(T)
{
    ref T refCountedPayload()
    {
        assert(false);
    }

    ref inout(T) refCountedPayload() inout
    {
        assert(false);
    }

    alias refCountedPayload this;
}

struct S
{
    struct Payload
    {
        int[] data;
    }

    RefCounted!Payload payload;
    alias X = typeof(payload.data[0]);

    void foo()
    {
        payload.data[0] = 0;
    }
}

int main(string[] argv)
{
    return 0;
}
//////////////////////////////////////////

It looks like the problem is specific to typeof this time.

--
October 01, 2021
https://issues.dlang.org/show_bug.cgi?id=13009

--- Comment #26 from Dlang Bot <dlang-bot@dlang.rocks> ---
@BorisCarvajal created dlang/dmd pull request #13118 "Fix Issue 13009 - [REG2.064] inout overload conflicts with non-inout when used via alias this" fixing this issue:

- Fix Issue 13009 - [REG2.064] inout overload conflicts with non-inout when used via alias this

https://github.com/dlang/dmd/pull/13118

--