[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmt] [EVL] Possible Bug with collection comparison

I may have discovered a bug which occurs when comparing collections.  I 
first ran the following validation file...

context SimpleClass!Entity {


constraint CheckingParentExists {

check : self.Child = true implies self.parent-> size = 1

message : 'There is no parent for ' + self.classname

}


constraint CheckChildOperations {

guard: self.Child = true


check : false


message : self.parent.operations->collect(s| s.name) + 'does not have the 
correct operations' + self.operations->collect(b|b.name)


}

..which as you would expect returned: " first collection" does not have the 
correct operations "second collection"


However when I add in a third constraint which should compare the two 
collections (as can be seen below) there is no validation output not even to 
the constraint where the check is set to false.  Is this a bug or am I doing 
something incorrectly?  [This used to work correctly]

context SimpleClass!Entity {


constraint CheckingParentExists {

check : self.Child = true implies self.parent-> size = 1

message : 'There is no parent for ' + self.classname

}


constraint CheckChildOperations {

guard: self.Child = true


check : false


message : self.parent.operations->collect(s| s.name) + 'does not have the 
correct operations' + self.operations->collect(b|b.name)


}


constraint CheckChildOperations {

guard: self.Child = true


check : self->collect(b|b.operations).includesAll( self.parent->collect(s| 
s.operations ))


message : self.classname + 'does not have the correct operations'


}



}