[Issue 14948] [Reg 2.068.0] AA key requirement was broken w/o notice and w/ horrible error message
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Aug 31 04:06:24 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14948
Kenji Hara <k.hara.pg at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|phobos |dmd
--- Comment #5 from Kenji Hara <k.hara.pg at gmail.com> ---
OK, I noticed this is a compiler issue.
Usually D compiler automatically generates toHash member function by using
TypeInfo.getHash function. But in particular case it had not worked.
Reduced test case:
struct RefCounted(T)
{
struct Impl
{
T data;
}
Impl* impl;
@property ref T payload() { return impl.data; }
alias payload this;
}
struct HTTP
{
struct Impl
{
}
RefCounted!Impl p;
}
void main()
{
int[HTTP] aa;
}
The root problem is very similar to issue 14806.
--
More information about the Digitalmars-d-bugs
mailing list