ETSI's Bug Tracker - Part 01: TTCN-3 Core Language
View Issue Details
0005361Part 01: TTCN-3 Core LanguageTechnicalpublic23-09-2009 17:2808-12-2009 16:28
Anthony Baire 
Ina Schieferdecker 
normalminoralways
closedfixed 
v4.1.1 (published 2009-06) 
v4.2.1 (published 2010-07)v4.2.1 (published 2010-07) 
19.10 A.1.6.7
     
0005361: BNF does not allow templates in return statements
It is possible to define TTCN-3 functions that return a template. However the current definition for return statements in the BNF does not allow returning a template:

  ReturnStatement ::= ReturnKeyword [Expression]

It should be replaced with the following:

  ReturnStatement ::= ReturnKeyword [Expression | TemplateBody]
  /* STATIC SEMANTICS - The Expression shall evaluate to an explicit value of a type compatible with the return type for functions returning a value and shall evaluate to an explicit value, template (literal or a template instance) or a matching mechanism compatible with the return type for functions returning a template. */

Note that section 19.10 should be updated as well.



No tags attached.
Issue History
23-09-2009 17:28Anthony BaireNew Issue
23-09-2009 17:28Anthony BaireStatusnew => assigned
23-09-2009 17:28Anthony BaireAssigned To => Ina Schieferdecker
23-09-2009 17:28Anthony BaireClause Reference(s) => 19.10 A.1.6.7
23-09-2009 17:28Anthony BaireSource (company - Author) =>
07-12-2009 14:34Ina SchieferdeckerTarget Version => Edition 4.2.1 (not yet published)
07-12-2009 14:34Ina SchieferdeckerDescription Updated
08-12-2009 16:15Ina SchieferdeckerNote Added: 0009100
08-12-2009 16:27Ina SchieferdeckerNote Edited: 0009100
08-12-2009 16:28Ina SchieferdeckerStatusassigned => resolved
08-12-2009 16:28Ina SchieferdeckerResolutionopen => fixed
08-12-2009 16:28Ina SchieferdeckerFixed in Version => Edition 4.2.1 (not yet published)
08-12-2009 16:28Ina SchieferdeckerStatusresolved => closed

Notes
(0009100)
Ina Schieferdecker   
08-12-2009 16:15   
(edited on: 08-12-2009 16:27)
As proposed - just rewording the comment:

Expression shall evaluate to a value of a type compatible with the return type for functions returning a value. It shall evaluate to a value, template (literal or template instance), or a matching mechanism compatible with the return type for functions returning a template.