PLC-lang/rusty

Hint user that a POU instance is missing

開放

#1,235 建立於 2024年6月5日

 (0 則留言) (0 個反應) (0 位負責人)Rust (71 個分叉)auto 404
good first issuelow-priorityvalidation

倉庫指標

星標
 (351 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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

貢獻者指南