Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[qvto-dev] Incremental assignment on unique feature

Hi

 

I recently discovered an anomaly with respect to an incremental AssignExp, and I’m not quite sure whether this is simply underspecified or a bug.

What should happen if a += is executed on a unique feature which, however, does already contain the added element (but not in the last place)?

Obviously the element can’t be added twice, but should it move to the end? Currently, it does not move.

 

Section 8.2.2.11 AssignExp is kind of vague, but at least states that the required behavior is to “append it depending on the isReset property”. A call to “append” on an ordered OCL collection (and also += as a shorthand in QVTo) will always “move” the element to the end. Thus, we have different behaviors for += depending on whether there is an OCL collection or an EMF feature on the left-hand side.

 

What do you think?

 

 

Kind regards

Christopher

 

 

 

 


Back to the top