Currently for code like this:
const to_addr = fn (raw: u256) addr {
if gt(shr(160, raw), 0) {
revert_empty();
}
addr { raw: raw }
} // Missing ';'
init {
// ...
}
I get an error:
error: unexpected `init`, expected one of `.`, `(`, `{`, `or`, `and`, `==`, `!=`, `<`, `>`, `<=`, `>=`, `|`, `^`, `&`, `<<`, `>>`, `+`, `-`, `+%`, `-%`, `*`, `/`, `%`, `*%`, `/+`,
`/-`, `/<`, `/>`, `;`
--> line 22:1
|
22| init {
| ^^^^
Which is technically correct but not really helpful. Error message needs to point to the const def statement and explain that the semi colon is missing. Tbh also not sure how '{' is a valid follow token.