Skip to content

Commit

Permalink
Merge pull request #1256 from visualfc/fix1243
Browse files Browse the repository at this point in the history
cl: fix #1243 for rangeExpr if pos
  • Loading branch information
xushiwei authored Jun 7, 2022
2 parents 6da9096 + 5f5ed74 commit c4b9074
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 c4b9074

Please sign in to comment.