1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

ui/examples: users: fix button click

This commit is contained in:
Alexander Medvednikov
2019-12-12 23:42:51 +03:00
parent cddfbf7395
commit 569a64068a
2 changed files with 18 additions and 9 deletions

View File

@@ -632,7 +632,8 @@ fn (p mut Parser) check_unused_and_mut_vars() {
p.production_error_with_token_index('`$var.name` declared and not used', var.token_idx )
}
if !var.is_changed && var.is_mut && !p.pref.is_repl &&
!p.pref.translated && var.typ != 'T*'
!p.pref.translated && var.typ != 'T*' &&
p.mod != 'ui'
{
p.error_with_token_index('`$var.name` is declared as mutable, but it was never changed', var.token_idx )
}