move
move copied to clipboard
[Feature Request] Improve documentation/error message about trailing semicolon
🚀 Feature Request
Given the example:
fun f(){return;}
... the compiler reports
adding a semicolon implicitly adds '()' value after the semicolon. That value '()' will not be reachable
But the documentation says:
The unit value '()' does not result in any runtime value ( https://diem.github.io/move/tuples.html )
This is confusing, specifically for new users which are not acquainted with the Rust-style syntax of Move,
[Collected from Aptos user forum]