fix prod build

pull/3635/head
Alexander Medvednikov 2020-02-03 11:17:12 +01:00
parent 60a4f668b7
commit e5f5117a7e
2 changed files with 2 additions and 5 deletions

View File

@ -668,7 +668,7 @@ fn (p mut Parser) check_unused_and_mut_vars() {
var.name != 'tmpl_res' && p.mod != 'vweb' && var.name != 'it' && !p.cur_fn.is_unsafe {
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.mod != 'ui' && var.typ != 'App*' {
if !var.is_changed && var.is_mut && !p.pref.is_repl && !p.pref.translated && var.name != 'it' && var.typ != 'T*' && p.mod != 'ui' && var.typ != 'App*' {
p.warn_or_error('`$var.name` is declared as mutable, but it was never changed')
}
}

View File

@ -96,9 +96,6 @@ fn (g mut Gen) stmt(node ast.Stmt) {
g.write('return')
// multiple returns
if it.exprs.len > 1 {
println('MULT RET')
println(g.fn_decl.ti.idx)
println(g.fn_decl.ti.name)
// ttln( := g.table.get_type(g.fn_decl.ti.idx)
ti := g.table.refresh_ti(g.fn_decl.ti)
g.write(' ($ti.name){')