PLC-lang/rusty

Hint user that a POU instance is missing

Offen

#1.235 geöffnet am 05.06.2024

 (0 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Rust (71 Forks)auto 404
good first issuelow-priorityvalidation

Repository-Metriken

Stars
 (351 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Is your feature request related to a problem? Please describe. The following code will return a Could not resolve reference to fn_with_one_parameter error

FUNCTION_BLOCK fn_with_one_parameter
    VAR_INPUT
        in_one : DINT;
    END_VAR
END_FUNCTION_BLOCK

FUNCTION main : DINT
    fn_with_one_parameter(1);
END_FUNCTION

This is because an instance hasn't been declared. Knowing this is a FUNCTION_BLOCK it would be nice to hint the user that they're not dealing with functions and are missing an instance declaration.

Describe the solution you'd like Improve the error message

Contributor Guide