fix option_test.v
							parent
							
								
									8947717e3e
								
							
						
					
					
						commit
						f2b1a8cb16
					
				| 
						 | 
					@ -126,9 +126,9 @@ fn (p mut Parser) gen_handle_option_or_else(_typ, name string, fn_call_ph int) s
 | 
				
			||||||
	last_ph := p.cgen.add_placeholder()
 | 
						last_ph := p.cgen.add_placeholder()
 | 
				
			||||||
	last_typ := p.statements()
 | 
						last_typ := p.statements()
 | 
				
			||||||
	if is_assign && last_typ == typ {
 | 
						if is_assign && last_typ == typ {
 | 
				
			||||||
		expr_line := p.cgen.lines[p.cgen.lines.len-3]
 | 
							expr_line := p.cgen.lines[p.cgen.lines.len-2]
 | 
				
			||||||
		last_expr := expr_line[last_ph..]
 | 
							last_expr := expr_line[last_ph..]
 | 
				
			||||||
		p.cgen.lines[p.cgen.lines.len-3]  = ''
 | 
							p.cgen.lines[p.cgen.lines.len-2]  = ''
 | 
				
			||||||
		p.genln('if (!$tmp .ok) {')
 | 
							p.genln('if (!$tmp .ok) {')
 | 
				
			||||||
		p.genln('$name = $last_expr;')
 | 
							p.genln('$name = $last_expr;')
 | 
				
			||||||
		p.genln('}')
 | 
							p.genln('}')
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue