-
Key: OCL2_-47
-
Legacy Issue Number: 7476
-
Status: closed
-
Source: OpenModeling ( Jos Warmer)
-
Summary:
– [2] The type of a collection literal expression is determined by the
– collection kind selection and the common supertype of all elements. Note that
– the definition below implicitly states that empty collections have OclVoid as
– their elementType.
context CollectionLiteralExp
inv: kind = CollectionKind::Set implies type.oclIsKindOf (SetType )
inv: kind = CollectionKind::Sequence implies type.oclIsKindOf (SequenceType)
inv: kind = CollectionKind::Bag implies type.oclIsKindOf (BagType )
inv: type.oclAsType (CollectionType).elementType = parts->iterate (p; c
:
Classifier = OclVoid | c.commonSuperType (p.type))
==> should be
context CollectionLiteralExp
inv: kind = CollectionKind::Set implies type =
StandardLibrary::StdLib::Set
inv: kind = CollectionKind::OrderedSet implies type =
StandardLibrary::StdLib::OrderedSet
inv: kind = CollectionKind::Sequence implies type =
StandardLibrary::StdLib::Sequence
inv: kind = CollectionKind::Bag implies type =
StandardLibrary::StdLib::Bag
inv: type.oclAsType
(OclAbstractSyntax::Types::CollectionType).elementType =
parts->iterate (p; c :
Classifier = StandardLibrary::StdLib::OclVoid | c.commonSuperType
(p.type)) -
Reported: OCL 2.0b2 — Thu, 10 Jun 2004 04:00 GMT
-
Disposition: Resolved — OCL 2.0
-
Disposition Summary:
No Data Available
-
Updated: Sun, 8 Mar 2015 13:35 GMT