Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [qvto-dev] ListLiteralExp inheritance (was Re: QVT 1.2 RTF Ballot 3 preview 2)

Hi Ed,

Since List type is in fact a mutable version of Sequence I'm inclined to agree with the alternative which you've proposed:

"since a ListLiteralExp is immutable, we can eliminate ListLiteralExp altogether and require that the CS 2 AS conversion synthesizes a Sequence{....}->asList() ".

I think it's most suitable choice for ListLiteral.

Reagrds,
  Sergey.


On Thu, Feb 6, 2014 at 10:43 AM, Ed Willink <ed@xxxxxxxxxxxxx> wrote:
Hi Sergey

I'm confused, so Defer is definitely a better resolution.

A ListLiteralExp can either have

CollectionLiteralExp::part: in which case every simple value must be wrapped by as a CollectionItem

ListLiteralExp::element: in which case CollectionRange is not available for integer ranges

If you have both, how are the two ordered lists of values interleaved? Are they required to be of equal length with a null CollectionLiteralExp::part wherever a ListLiteralExp::element is used?

I think the proposed resolution is actually correct but we need to add an IntegerRangeExp to support the embedded range.

Alternatively, since a ListLiteralExp is immutable, we can eliminate ListLiteralExp altogether and require that the CS 2 AS conversion synthesizes a Sequence{....}->asList() .

    Regards

        Ed

On 05/02/2014 16:35, Sergey Boyko wrote:
Issue 14620: QVT 1.1 Inappropriate ListLiteralExp inheritance (Correction to issue 12375 resolution).

Proposed resolution is incorrect. ListLiteralExp correctly extends CollectionLiteralExp type thus allowing to reuse existing CollectionLiteralPart.


_______________________________________________
qvto-dev mailing list
qvto-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/qvto-dev



Back to the top