| --- | --- |
| Bugzilla Link | 474550 |
| Status | NEW |
| Importance | P3 normal |
| Reported | Aug 08, 2015 16:25 EDT |
| Modified | Aug 09, 2015 04:50 EDT |
| Reporter | Ed Willink |
Description
The OCL spec specifies that any invalid body during an iteration propagates as invalid. This prohibits the current premature return once a good return is found.
| --- | --- | | Bugzilla Link | 474550 | | Status | NEW | | Importance | P3 normal | | Reported | Aug 08, 2015 16:25 EDT | | Modified | Aug 09, 2015 04:50 EDT | | Reporter | Ed Willink |
Description
The OCL spec specifies that any invalid body during an iteration propagates as invalid. This prohibits the current premature return once a good return is found.
e.g.
"Sequence{Sequence{true}, Sequence{false}, Sequence{}}->any(i | i->first())"
should be invalid, not true.
The OCL spec is also clear on how null body values interact with reject/select etc. The current implementation treats null as a 3-valued invalid.
A full iteration is burdensome for CG. A cannot-be-invalid analysis may permit a premature return.