Re: [Jastadd] JastAdd bug report: insertChild() + childIndex

From: Jesper Mattsson <jesper.mattsson_at_modelon.com>
Date: Thu, 1 Mar 2012 01:24:45 -0800

Hi Jesper

Thank you, I'll use getIndexOfChild() instead then.

Jesper

Jesper MATTSSON, MSc
Software Developer & IT Administrator

Phone direct: +46 73 324 5909
Email: jesper.mattsson_at_modelon.com<mailto:jesper.mattsson_at_modelon.com>

[cid:image001.png_at_01CCF795.171BD6F0]
________________________________
Modelon AB
Ideon Science Park
SE-223 70 Lund, Sweden

Phone: +46 46 286 2200
Fax: +46 46 286 2201


Web: http://www.modelon.com<http://www.modelon.com/>



From: jastadd-bounces_at_cs.lth.se [mailto:jastadd-bounces_at_cs.lth.se] On Behalf Of Jesper qvist
Sent: den 1 mars 2012 10:10
To: jastadd_at_cs.lth.se
Subject: Re: [Jastadd] JastAdd bug report: insertChild() + childIndex

It seems that the ASTNode.getIndexOfChild(ASTNode) method checks that the childIndex value is correct, and if not updates it. All uses of child index seem to use the getIndexOfChild method rather than accessing the childIndex value directly.

This is still something that probably should be fixed, so I've added a ticket for it on the trac since there wasn't one there already.

/Jesper

On 02/28/2012 06:04 PM, Jesper Mattsson wrote:
Hi

The method ASTNode.insertChild() does not properly update the childIndex field of the nodes already in the list that were shifted by the insertion.

Jesper

Jesper MATTSSON, MSc
Software Developer & IT Administrator

Phone direct: +46 73 324 5909
Email: jesper.mattsson_at_modelon.com<mailto:jesper.mattsson_at_modelon.com>

[cid:image001.png_at_01CCF795.171BD6F0]
________________________________
Modelon AB
Ideon Science Park
SE-223 70 Lund, Sweden

Phone: +46 46 286 2200
Fax: +46 46 286 2201


Web: http://www.modelon.com<http://www.modelon.com/>








_______________________________________________

JastAdd mailing list

JastAdd_at_cs.lth.se<mailto:JastAdd_at_cs.lth.se>

https://mail1.cs.lth.se/cgi-bin/mailman/listinfo/jastadd





image001.png
(image/png attachment: image001.png)

Received on Thu Mar 01 2012 - 10:25:24 CET

This archive was generated by hypermail 2.3.0 : Wed Apr 16 2014 - 17:19:06 CEST