ast: fix IfExpr.str() (#14595)
							parent
							
								
									34d30b0ee5
								
							
						
					
					
						commit
						47300ae03f
					
				|  | @ -363,6 +363,8 @@ pub fn (x Expr) str() string { | ||||||
| 				} | 				} | ||||||
| 				if i < x.branches.len - 1 || !x.has_else { | 				if i < x.branches.len - 1 || !x.has_else { | ||||||
| 					parts << ' ${dollar}if ' + branch.cond.str() + ' { ' | 					parts << ' ${dollar}if ' + branch.cond.str() + ' { ' | ||||||
|  | 				} else if x.has_else && i == x.branches.len - 1 { | ||||||
|  | 					parts << '{ ' | ||||||
| 				} | 				} | ||||||
| 				for stmt in branch.stmts { | 				for stmt in branch.stmts { | ||||||
| 					parts << stmt.str() | 					parts << stmt.str() | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue