Community
Participate
Working Groups
operation child(childName : String[?]) : Person[?] { body: children->any(c : Person | c.name=childName); } works but operation child(childName : String[?]) : Person[?] { body: children->any(name=childName); } doesn't since implicit self is not resolved to the implicit iterator.
Problem seems to involve references to the 'wrong' CS copy. In principle implicit self is handled, but Xtext reparses create multiple CS trees, so the wrong one is easy to use. Problem will go away once references terminate in the Pivot AST.
The following fails interactively but not as a JUnit test. package bug328485 : bug = 'http://www.eclipse.org/mdt/ocl/bug328485' { class Bug328485 { property names : Named[*]; invariant Self: names->any(name = '') = 1; } class Named { property name : String; } }
Indeed problem has gone away. Test added.
CLOSED after a year in the RESOLVED state.