Skip to content

Segfault when passing a parameter to a reference to input #1539

@Angus-Bethke-Bachmann

Description

@Angus-Bethke-Bachmann

Describe the bug
A Segfault occurs when passing a parameter to a reference to input.

To Reproduce
Steps to reproduce the behavior:

TYPE EnumType : (
        red,
        green,
        blue
    );
END_TYPE

FUNCTION fnReferenceTo : EnumType
VAR_INPUT
    inVar	: Reference To EnumType;
END_VAR
    fnReferenceTo := inVar;
END_FUNCTION

FUNCTION main
VAR
    outVarReferenceTo : EnumType;
END_VAR
    outVarReferenceTo := fnReferenceTo(blue);
END_FUNCTION

Expected behavior
There shouldn't be a segfault. A validation error should be present in the case of a invalid scenario, and it should work if the scenario is valid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions