ETSI's Bug Tracker - Part 01: TTCN-3 Core Language
View Issue Details

ID | Project | Category | View Status | Date Submitted | Last Update
0007450 | Part 01: TTCN-3 Core Language | New Feature | public | 15-07-2016 12:50 | 16-12-2016 19:21

Reporter | Jacob Wieland - Spirent |
Assigned To | Gyorgy Rethy |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | fixed |
Platform |  | OS |  | OS Version |
Product Version | v4.8.1 (published 2016-07) |
Target Version | v4.9.1 (published 2017-05) | Fixed in Version | v4.9.1 (published 2017-05) |
Clause Reference(s) | 6.3.2.1
Source (company - Author) | Spirent - Jacob Wieland

Summary | 0007450: enumerated types should be compatible on par with other structured types

Description

At the moment, an enumerated type (and its values) is only compatible to itself, but not to any other enumerated type.
That means that two structured types which contain an enumerated type and have the same form in every aspect also are not compatible to each other, even though that is true for all base types and all other structured types.
Example:
type record A {
integer i (1..200) optional
}
is compatible to
type record B {
integer j (1..200) optional
}
but
type record A2 {
enumerated { a, b } e optional
}
is not compatible to
type record B2 {
enumerated { a, b } f optional
}
This, in my view, is an unnecessary language inconsistency which, for instance, prevents simple value-translation from an old, compatible type to a new one.
It is also unclear why this restriction is imposed at all.
Therefore, I propose to add a type-compatibility rule that states that any enumerated value b of enumerated type B is compatible with enumerated type A if an enumerated value with the same name also exists in A and has the same number associated with it as b in B. Naturally, then, an enumerated type B is compatible to an enumerated type A if all its values are compatible with A.
If this rule is introduced, an enumerated type essentially behaves like a restricted integer type, though still not compatible with integer types but only with other enumerated types.

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files | CR7450.docx (151,319) 19-07-2016 15:51 http://oldforge.etsi.org/mantis/file_download.php?file_id=3418&type=bug CR7450-2.docx (170,763) 19-07-2016 16:33 http://oldforge.etsi.org/mantis/file_download.php?file_id=3419&type=bug

Issue History
Date Modified | Username | Field | Change
15-07-2016 12:50 | Jacob Wieland - Spirent | New Issue |
18-07-2016 09:56 | Jens Grabowski | Assigned To | => Jacob Wieland - Spirent
18-07-2016 09:56 | Jens Grabowski | Status | new => assigned
19-07-2016 15:51 | Jacob Wieland - Spirent | File Added: CR7450.docx |
19-07-2016 15:52 | Jacob Wieland - Spirent | Note Added: 0013992 |
19-07-2016 15:52 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Tomas Urban
19-07-2016 15:52 | Jacob Wieland - Spirent | Status | assigned => confirmed
19-07-2016 16:33 | Tomas Urban | File Added: CR7450-2.docx |
19-07-2016 16:36 | Tomas Urban | Note Added: 0013994 |
19-07-2016 16:36 | Tomas Urban | Assigned To | Tomas Urban => Jacob Wieland - Spirent
21-07-2016 11:26 | Jacob Wieland - Spirent | Note Added: 0014029 |
21-07-2016 11:26 | Jacob Wieland - Spirent | Status | confirmed => resolved
21-07-2016 11:26 | Jacob Wieland - Spirent | Fixed in Version | => v4.8.1 (published 2016-07)
21-07-2016 11:26 | Jacob Wieland - Spirent | Resolution | open => fixed
21-07-2016 11:26 | Jacob Wieland - Spirent | Assigned To | Jacob Wieland - Spirent => Gyorgy Rethy
16-12-2016 19:21 | Gyorgy Rethy | Note Added: 0014448 |
16-12-2016 19:21 | Gyorgy Rethy | Status | resolved => closed
16-12-2016 19:21 | Gyorgy Rethy | Fixed in Version | v4.8.1 (published 2016-07) => v4.9.1 (published 2017-05)

Notes

(0013992)
Jacob Wieland - Spirent
19-07-2016 15:52

please review

(0013994)
Tomas Urban
19-07-2016 16:36

Minor changes in the text so that it is compatible with the section 6.3.0. Please review and if fine, it can be marked as resolved. A separate CR will be submited for the terminology of the union compatibility.

(0014029)
Jacob Wieland - Spirent
21-07-2016 11:26

text is ok

(0014448)
Gyorgy Rethy
16-12-2016 19:21

Added to draft V4.8.2