From 5f5ed7412aaa1880ae26cc8e5877e3b31ec6e1e7 Mon Sep 17 00:00:00 2001 From: visualfc Date: Tue, 7 Jun 2022 07:49:49 +0800 Subject: [PATCH] cl: fix #1243 for rangeExpr if pos --- cl/stmt.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cl/stmt.go b/cl/stmt.go index c788fa99e..1a7b590b4 100644 --- a/cl/stmt.go +++ b/cl/stmt.go @@ -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,