-
Key: OCL24-11
-
Legacy Issue Number: 18515
-
Status: closed
-
Source: Universidad Nacional del Litoral ( Roberto Javier Godoy)
-
Summary:
The accumulator in the definition of Collection::min and Collection::max is initialized as self.first().
post: result = self->iterate( elem; acc : T = self.first() | acc.min(elem) )
post: result = self->iterate( elem; acc : T = self.first() | acc.max(elem) )
The accumulator should be initialized as self.asSequence()->first(), because Collection::first() is undefined.
-
Reported: OCL 2.3.1 — Fri, 1 Mar 2013 05:00 GMT
-
Disposition: Resolved — OCL 2.4
-
Disposition Summary:
Nearly right.
self is of course a Collection, so needs to be self->asSequence()>first(), or just self>any(true). -
Updated: Fri, 6 Mar 2015 20:57 GMT
OCL24 — Collection::min/max accumulator initialized as self.first()
- Key: OCL24-11
- OMG Task Force: 2nd OCL 2.4 RTF