parser: add error when trying to assign from a function that does not return a value

This commit is contained in:
joe-conigliaro 2019-11-04 22:35:10 +11:00 committed by Alexander Medvednikov
parent b4e8989bd1
commit 5d16f30a3d
4 changed files with 24 additions and 12 deletions

View file

@ -280,12 +280,13 @@ fn (s mut Scanner) eat_single_newline(){
///////////////////////////////
const (
match_arrow_warning = '=> is no longer needed in match statements, use\n' +
warn_match_arrow = '=> is no longer needed in match statements, use\n' +
'match foo {
1 { bar }
2 { baz }
else { ... }
}'
//make_receiver_mutable =
err_used_as_value = 'used as value'
)