aptos-core
aptos-core copied to clipboard
[compiler] Error message when wrongly using string constants is not useful
Supposed you start with Move and try to create a string constant
string::utf8("<empty>")
There is a b"..."
missing in front of the string, but the error you get is:
error: invalid character
┌─ /Users/wrwg/play/tn/sources/hello.move:21:35
│
21 │ Empty => string::utf8("<empty>"),
│ ^ Invalid character: '"'
To figure the solution is hard for Move beginners.