From 307ce61ece38f2fbbfad5e85ae26bfbd1268f87f Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Sun, 3 Nov 2024 14:57:53 +0100 Subject: [PATCH] Apply suggestions from code review --- compiler/cbuilderstmts.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/cbuilderstmts.nim b/compiler/cbuilderstmts.nim index 317953872665..e2d272e79524 100644 --- a/compiler/cbuilderstmts.nim +++ b/compiler/cbuilderstmts.nim @@ -93,14 +93,14 @@ template addElseBranch(builder: var Builder, stmt: var IfStmt, body: typed) = body builder.add("}") -proc addForRangeHeader(builder: var Builder, i, start, bound: Snippet, inclusive: static bool = false) = +proc addForRangeHeader(builder: var Builder, i, start, bound: Snippet, inclusive: bool = false) = builder.add("for (") builder.add(i) builder.add(" = ") builder.add(start) builder.add("; ") builder.add(i) - when inclusive: + if inclusive: builder.add(" <= ") else: builder.add(" < ")