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.