fix prod build
							parent
							
								
									60a4f668b7
								
							
						
					
					
						commit
						e5f5117a7e
					
				|  | @ -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 { | 			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) | 			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') | 			p.warn_or_error('`$var.name` is declared as mutable, but it was never changed') | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | @ -24,7 +24,7 @@ pub fn cgen(files []ast.File, table &table.Table) string { | ||||||
| 		definitions: strings.new_builder(100) | 		definitions: strings.new_builder(100) | ||||||
| 		table: table | 		table: table | ||||||
| 		checker: checker.new_checker(table) // checker
 | 		checker: checker.new_checker(table) // checker
 | ||||||
| 
 | 		 | ||||||
| 		fn_decl: 0 | 		fn_decl: 0 | ||||||
| 	} | 	} | ||||||
| 	for file in files { | 	for file in files { | ||||||
|  | @ -96,9 +96,6 @@ fn (g mut Gen) stmt(node ast.Stmt) { | ||||||
| 			g.write('return') | 			g.write('return') | ||||||
| 			// multiple returns
 | 			// multiple returns
 | ||||||
| 			if it.exprs.len > 1 { | 			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)
 | 				// ttln( := g.table.get_type(g.fn_decl.ti.idx)
 | ||||||
| 				ti := g.table.refresh_ti(g.fn_decl.ti) | 				ti := g.table.refresh_ti(g.fn_decl.ti) | ||||||
| 				g.write(' ($ti.name){') | 				g.write(' ($ti.name){') | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue