Logo etsi

ETSI's Bug Tracker

Notice: information submitted on the ETSI issue Tracker may be incorporated in ETSI publication(s) and therefore subject to the ETSI IPR policy.

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005607Part 01: TTCN-3 Core LanguageTechnicalpublic14-07-2010 15:3414-12-2010 23:59
ReporterJacob Wieland - Spirent 
Assigned ToIna Schieferdecker 
PrioritynormalSeverityminorReproducibilityN/A
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Versionv4.3.1 (published 2011-06)Fixed in Versionv4.3.1 (published 2011-06) 
Summary0005607: definitions of an enum type should not have the same name as an enum value in that type
DescriptionAt the moment, a local definition (parameter, variable or constant) or a definition inherited from the runs on clause (i.e. component variable or constant) can have the same name as an enumerated value defined in some enumerated type.

If that definition has an enumerated type which includes such a value, it would not be possible to distinguish between the enum value and the reference to that definition (both have the same type, none of them can be prefixed to resolve the nameclash).

To avoid this, it should be forbidden to introduce (local) definitions (except struct-field-defs) of an enumerated type that have the same name as an enumerated value in that type.

For consistency's sake, the same restriction could be applied to global definitions (const, modulepar, template), as well. Then, it will never be necessary to prefix an reference to a definition of an enumerated type to resolve the nameclash with the enumerated value. Also, defining an entity of an enumerated type with the same name as an enumerated value in that type is pathological at best and would only lead to confusion in any case - another reason why this should be forbidden.
TagsNo tags attached.
Clause Reference(s)6.2.4.
Source (company - Author)Testing Technologies - Jacob Wieland
Attached Filesdoc file icon CR5607.doc [^] (40,960 bytes) 03-09-2010 11:54

- Relationships
related to 0005958closedIna Schieferdecker Example 4 of section 8.2.3.1 must be rewritten according to CR5607 
related to 0006440closedIna Schieferdecker Restriction on imported enumerated types 

-  Notes
(0009652)
Gyorgy Rethy (reporter)
30-08-2010 11:40

Forbid local and global names of enum. type use the same name as an enumer. value of that given type.
(0009654)
Jacob Wieland - Spirent (reporter)
30-08-2010 13:41

In 6.2.4 the following sentence should be added:

"They shall also not be re-used for local or global definitions of the enumerated type which introduces them."

Maybe also a NOTE should be added that because of this all template/var/const/modulepar/formal parameter declarations of an enumerated type shall not have the same name as an enumeration in that type, regardless where that declaration occurs.
(0009691)
Gyorgy Rethy (reporter)
02-09-2010 09:53

This sentence is somewhat too generic, will not be clear for the ordinary user. I think we should be more precise in that, like:
"When a TTCN-3 global or local definition is declared using an imported enumerated type, the name of that definition shall not be same as any of the enumeration value names of that type."
(0009708)
Jacob Wieland - Spirent (reporter)
03-09-2010 11:53

agreed, I have added this to the document I'll shortly upload
(0009973)
Ina Schieferdecker (reporter)
14-12-2010 23:58

Implemented as proposed

- Issue History
Date Modified Username Field Change
14-07-2010 15:34 Jacob Wieland - Spirent New Issue
14-07-2010 15:34 Jacob Wieland - Spirent Clause Reference(s) => 6.2.4.
14-07-2010 15:34 Jacob Wieland - Spirent Source (company - Author) => Testing Technologies - Jacob Wieland
30-08-2010 11:32 Gyorgy Rethy Status new => assigned
30-08-2010 11:32 Gyorgy Rethy Assigned To => Jacob Wieland - Spirent
30-08-2010 11:40 Gyorgy Rethy Note Added: 0009652
30-08-2010 13:41 Jacob Wieland - Spirent Note Added: 0009654
30-08-2010 17:24 Jacob Wieland - Spirent Assigned To Jacob Wieland - Spirent => Gyorgy Rethy
02-09-2010 09:53 Gyorgy Rethy Note Added: 0009691
02-09-2010 09:53 Gyorgy Rethy Assigned To Gyorgy Rethy => Jacob Wieland - Spirent
03-09-2010 09:25 Gyorgy Rethy Project TTCN-3 Change Requests => Part 01: TTCN-3 Core Language
03-09-2010 09:25 Gyorgy Rethy Target Version => Edition 4.3.1 (not yet published)
03-09-2010 11:53 Jacob Wieland - Spirent Note Added: 0009708
03-09-2010 11:54 Jacob Wieland - Spirent File Added: CR5607.doc
03-09-2010 11:54 Jacob Wieland - Spirent Assigned To Jacob Wieland - Spirent => Gyorgy Rethy
03-09-2010 11:54 Jacob Wieland - Spirent Assigned To Gyorgy Rethy => Ina Schieferdecker
03-09-2010 11:55 Jacob Wieland - Spirent Status assigned => resolved
03-09-2010 11:55 Jacob Wieland - Spirent Fixed in Version => Edition 4.3.1 (not yet published)
03-09-2010 11:55 Jacob Wieland - Spirent Resolution open => fixed
14-12-2010 23:58 Ina Schieferdecker Note Added: 0009973
14-12-2010 23:59 Ina Schieferdecker Status resolved => closed
28-11-2011 15:38 Ina Schieferdecker Relationship added related to 0005958
19-03-2013 08:22 Tomas Urban Relationship added related to 0006440


MantisBT 1.2.14 [^]
Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker