Skip to content

Commit

Permalink
cl: fix #1243 for rangeExpr if pos
Browse files Browse the repository at this point in the history
  • Loading branch information
visualfc committed Jun 6, 2022
1 parent ceab5cd commit 5f5ed74
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cl/stmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ func toForStmt(forPos token.Pos, value ast.Expr, body *ast.BlockStmt, re *ast.Ra
}
if fp != nil && fp.Cond != nil {
condStmt := &ast.IfStmt{
If: fp.Cond.Pos(),
Init: fp.Init,
Cond: fp.Cond,
Body: body,
Expand Down

0 comments on commit 5f5ed74

Please sign in to comment.