[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
Wed Feb 12 04:03:42 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=13009
--- Comment #25 from Vladimir Panteleev <dlang-bugzilla at 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.
--
More information about the Digitalmars-d-bugs
mailing list