On 11 October 2010 08:32, Lukas Renggli
<renggli@gmail.com> wrote:
Wow, that's a very nasty bug. Amazing that this hasn't hit anybody
before. Looks like this could happen quite common in systems like
Pier, not only with MABooleanDescription instances.
http://code.google.com/p/magritte-metamodel/issues/detail?id=7
The validation code is really ugly. And likely this bug was introduced
when trying to support the validation for recursive structures. I
would be happy if someone could rewrite that code? (also get rid of
these nested, resumable exceptions).
I'm happy to help, especially as I'd like a fix for the code I'm developing.
However I'm struggling to understand the intent of the some of the code for example I don't understand the intent behind the use of object and previous in MAGraphVisitor>>#use:during
MAGraphVisitor>>#use: anObject during: aBlock
| previous |
(seen includes: anObject)
ifTrue: [ ^ self ].
anObject isNil
ifFalse: [ seen add: anObject ].
previous := object. object := anObject.
aBlock ensure: [ object := previous ]