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

ID | Project | Category | View Status | Date Submitted | Last Update
0005175 | Part 01: TTCN-3 Core Language | New Feature | public | 13-05-2009 22:36 | 07-12-2009 14:47

Reporter | Ming Shang |
Assigned To | Ina Schieferdecker |
Priority | normal | Severity | minor | Reproducibility | have not tried
Status | closed | Resolution | won't fix |
Platform |  | OS |  | OS Version |
Product Version | v3.4.1 (published 2008-09) |
Target Version | v4.2.1 (published 2010-07) | Fixed in Version | v4.2.1 (published 2010-07) |
Clause Reference(s) | 16.1
Source (company - Author) |

Summary | 0005175: Overloaded Function does NOT support

Description

When I define the first function with name `buildRegisterRequest` as follows:
function buildRegisterRequest(
in integer StatusCode, in charstring ReasonPhrase) return integer
But when I try to define another one with the same function name but with different parameter specification:
function buildRegisterRequest(in integer StatusCode) return integer
I got the following error:
[ERROR]: 'buildRegisterRequest' is already declared
It would be better that overloaded function just like in C++ is supported in TTCN.

Steps To Reproduce |
Additional Information |
Tags | No tags attached.
Relationships |
Attached Files | OverloadingExamples.zip (2,913) 09-07-2009 09:05 http://oldforge.etsi.org/mantis/file_download.php?file_id=2196&type=bug

Issue History
Date Modified | Username | Field | Change
13-05-2009 22:36 | Ming Shang | New Issue |
13-05-2009 22:36 | Ming Shang | Status | new => assigned
13-05-2009 22:36 | Ming Shang | Assigned To | => Ina Schieferdecker
13-05-2009 22:36 | Ming Shang | Clause Reference(s) | => 16.1
13-05-2009 22:36 | Ming Shang | Source (company - Author) | =>
09-07-2009 09:05 | Gyorgy Rethy | File Added: OverloadingExamples.zip |
09-07-2009 09:10 | Gyorgy Rethy | Note Added: 0008878 |
09-07-2009 14:16 | Ina Schieferdecker | Note Added: 0008883 |
09-07-2009 14:16 | Ina Schieferdecker | Resolution | open => won't fix
09-07-2009 14:16 | Ina Schieferdecker | Status | assigned => closed
07-12-2009 14:47 | Ina Schieferdecker | Fixed in Version | => Edition 4.2.1 (not yet published)
07-12-2009 14:47 | Ina Schieferdecker | Target Version | => Edition 4.2.1 (not yet published)

Notes

(0008878)
Gyorgy Rethy
09-07-2009 09:10

OverloadingExamples.zip: Contains some example overloaded functions and examples of calling them. Complications are self-explaining, though, the "ahhh, I have forgotten the last parameter" case is even not covered.

(0008883)
Ina Schieferdecker
09-07-2009 14:16

This CR is rejected because of the reasons given in the examples (see zip file). You may however consider to use function parameters with default values (see 5.4.1 for details) which provide a similar feature and could solve your issue, though in another way.