-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Labels
validationcandidate for syntactic or semantic validationcandidate for syntactic or semantic validation
Description
Describe the bug
When a reference in an IF-statement condition is not resolvable, we do not currently catch that during validation. Instead, the user receives a rather cryptic cannot generate call statement for ReferenceExpr { kind: Member(Identifier { name: "UINT_EQUAL" }), base: None } at: ....
To Reproduce
Steps to reproduce the behavior:
compile the following:
TYPE ErrorCode :
STRUCT
Lib : UINT; (**< Error library code *)
Reason : UINT; (**< Error reason code *)
Func : UDINT; (**< Error function code *)
END_STRUCT
END_TYPE
PROGRAM mainProg
VAR
Error: ErrorCode;
END_VAR
IF Error.Reason <> ERROR_OK THEN // unresolved reference in conditional
END_IF
END_PROGRAM
Expected behavior
A clear, concise and helpful error message about the unresolved reference.
Metadata
Metadata
Assignees
Labels
validationcandidate for syntactic or semantic validationcandidate for syntactic or semantic validation