digitalmars.D - Bug? array concatenation/appand
- icee (17/17) Jun 26 2006 struct SPoint{
- Jarrett Billingsley (3/4) Jun 26 2006 All internal errors are bugs.
- Rémy Mouëza (4/21) Jun 27 2006 It seems that you are calling a non static function in a static context....
struct SPoint{ double x,y; SPoint create(double x,double y){ SPoint p; p.x=x; p.y=y; return p; } } .. SPoint[] sps; sps~=SPoint.create(2,4);//OK. sps=sps~SPoint.create(2,4);//Internal error: ..\ztc\type.c 308, dmd v0.161 int[] a; a~=2;//OK. a=a~2;//OK. Is this a bug or I'd made some mistakes.
Jun 26 2006
"icee" <iceelyne gmail.com> wrote in message news:e7q4o7$7sk$1 digitaldaemon.com...Is this a bug or I'd made some mistakes.All internal errors are bugs.
Jun 26 2006
In article <e7q4o7$7sk$1 digitaldaemon.com>, icee says...struct SPoint{ double x,y; SPoint create(double x,double y){ SPoint p; p.x=x; p.y=y; return p; } } .. SPoint[] sps; sps~=SPoint.create(2,4);//OK. sps=sps~SPoint.create(2,4);//Internal error: ..\ztc\type.c 308, dmd v0.161 int[] a; a~=2;//OK. a=a~2;//OK. Is this a bug or I'd made some mistakes.It seems that you are calling a non static function in a static context. The compiler should have detected this. Have you tried to put a static qualifier to the Spoint.create member function ?
Jun 27 2006