move icon indicating copy to clipboard operation
move copied to clipboard

[Feature Request] Improve documentation/error message about trailing semicolon

Open wrwg opened this issue 3 years ago • 0 comments

🚀 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]

wrwg avatar May 15 '22 17:05 wrwg