Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • 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
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 111
    • Issues 111
    • 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 ProjectsEclipse Projects
  • Eclipse Titan
  • titan.core
  • Issues
  • #599
Closed
Open
Issue created Apr 14, 2022 by Miklos Magyari@mmagyariDeveloper

Wrong code generated when accessing parent class member

When a class extends a parent that is defined in a separate module, the code generated for referencing an inherited member has an extra 'modulename::' prefix.

Example code:

module m1 {
    public type class @abstract Parent {	  	 	    
        var charstring cmd := "";
    }

    const integer mycon := 0;
}

module m2 {
    import from m1 all; 
    type class @final Child extends Parent {
        var integer v_cap;

        create():Parent("") {
            v_cap := 1;
            cmd := "abcd";
        }
    }
}

The generated code for cmd := "abcd" includes:

/* m2.ttcn3, line 8 */
m1::cmd = cs_0;

This results a gcc compile error:

image

If the parent and the child classes are in the same module, there is no compile error as the generated code is:

this->cmd = cs_0;
Assignee
Assign to
Time tracking

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