Skip to content

Disallow reserved name portNum from port definition #885

@Kronos3

Description

@Kronos3

Say you have:

port P(portNum: FwIndexType)

This will generate:

...
(
        Fw::PassiveComponentBase* callComp,
        FwIndexType portNum,
        FwIndexType portNum,
...

And an compiler error like this:

In file included from /Users/tumbar/git/fprime/FppTestProject/cmake-build-debug/FppTest/topology/ports/ReplyPortAc.cpp:7:
/Users/tumbar/git/fprime/FppTestProject/cmake-build-debug/FppTest/topology/ports/ReplyPortAc.hpp:54:21: error: redefinition of parameter 'portNum'
   54 |         FwIndexType portNum,
      |                     ^
/Users/tumbar/git/fprime/FppTestProject/cmake-build-debug/FppTest/topology/ports/ReplyPortAc.hpp:53:21: note: previous declaration is here
   53 |         FwIndexType portNum,
      |                     ^
1 error generated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcode generationIssues related to code generation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions