Behaviour of alias this changed
H. S. Teoh
hsteoh at quickfur.ath.cx
Thu May 10 13:02:42 PDT 2012
On Wed, May 09, 2012 at 02:10:37PM +0900, kenji hara wrote:
> 2012/5/9 H. S. Teoh <hsteoh at quickfur.ath.cx>:
> > I have some code along these lines:
> >
> > struct S {
> > short[4] data;
> > alias this data;
> >
> > string toString() { ... }
> > }
> > ...
> > S s;
> > writeln(to!string(s));
> >
> > In dmd 2.059 (I believe) and earlier, this calls S.toString(). However,
> > in git dmd, this calls data.toString() instead.
>
> This is a Phobos regression in git head (and maybe in 2.059).
> Please file this in bugzilla.
[...]
Done, sorry for the delay (too many forum posts to catch up with :-P):
http://d.puremagic.com/issues/show_bug.cgi?id=8080
T
--
Why have vacation when you can work?? -- EC
More information about the Digitalmars-d
mailing list