PLC-lang/rusty

Method calls without parentheses should emit a warning/error

开放

#1,449 创建于 2025年3月28日

 (0 条评论) (0 个反应) (0 位负责人)Rust (71 个派生)auto 404
good first issuemedium-priorityvalidation

仓库指标

星标
 (351 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Is your feature request related to a problem? Please describe. Currently, trying to call a method without () will simply generate a GEP-instruction and have no further effect. The method is never called and assigning the return-value will attempt to write the pointer value from the GEP. So far, I haven't been able to force a segfault due to this, but when trying to generate IR llvm will abort with an error during verification.

Describe the solution you'd like We should at the very least warn the user that the statement will result in UB, I'm fine with emitting an error aswell.

贡献者指南