overzealous pointsTo()
Nick Voronin
elfy.nv at gmail.com
Sun Dec 12 12:17:16 PST 2010
On Sun, 12 Dec 2010 22:36:03 +0300, Nick Voronin <elfy.nv at gmail.com> wrote:
>
> pointsTo() tries to check every member of anonymous union inside struct.
alias this makes a passable workaround though. (I hope) :)
union U
{
int i;
string s;
}
struct S3
{
int type;
U u;
alias u this;
}
void main()
{
S3 s3;
s3.i = 0x7FFF_FFFF;
assert(!pointsTo(s3, s3)); // pass
}
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
More information about the Digitalmars-d-learn
mailing list