PLC-lang/rusty

Method calls without parentheses should emit a warning/error

Aperta

#1449 aperta il 28 mar 2025

 (0 commenti) (0 reazioni) (0 assegnatari)Rust (71 fork)auto 404
good first issuemedium-priorityvalidation

Metriche repository

Star
 (351 stelle)
Metriche merge PR
 (Metriche PR in attesa)

Descrizione

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.

Guida contributor