Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • T titan.core
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 49
    • Issues 49
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Eclipse Projects
  • Eclipse Titan
  • titan.core
  • Issues
  • #587

Closed
Open
Created Mar 17, 2022 by Lenard Nagy@lnagyMaintainer

[CR] Standard change regarding parameters of functions with runs on clause

Summary

TTCN-3 standard changed (5.4.1.1 Formal parameters of kind value, Restrictions section)

v4.3.1: "e) The expression of the default value has to be compatible with the type of the parameter. The expression shall not refer to elements of the component type of the optional runs on clause. The expression shall not refer to other parameters of the same parameter list. The expression shall not contain the invocation of functions with a runs on clause."

vs

v4.13.1: "e) The expression of formal parameter's default value has to be compatible with the type of the parameter. The expression may be any expression that is well-defined at the beginning of the scope of the parameterized entity, but shall not refer to other parameters of the same parameter list."

Steps and/or TTCN-3 code to reproduce

function f_myFunction( in integer p_par := vc_componentVariable) runs on CompType return Integer {}

type component CompType {
var integer vc_componentVariable := 0;
}

What is the current bug behavior?

The compiler reports error to the example code above:

Error: default value cannot refer to a template field of the component in the `runs on' clause

What is the expected correct behavior?

The compiler should accept the code

Titan version

8.1.1

Platform details (OS type and version)

Any

/cc @aknappqwt

Edited Mar 17, 2022 by Miklos Magyari
Assignee
Assign to
Time tracking

Copyright © Eclipse Foundation, Inc. All Rights Reserved.     Privacy Policy | Terms of Use | Copyright Agent