[Issue 13009] [REG2.064] inout overload conflicts with non-inout when used via alias this
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Dec 22 00:35:14 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=13009
--- Comment #23 from bitwise <nicolas.jinchereau at 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.
--
More information about the Digitalmars-d-bugs
mailing list