This commit is contained in:
flywind 2021-02-17 23:59:58 -06:00 • committed by GitHub
commit 8873ec6084
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 4 deletions

View file

@ -2180,7 +2180,11 @@ proc genSetConstr(p: PProc, n: PNode, r: var TCompRes) =
if it.kind == nkRange:
gen(p, it[0], a)
gen(p, it[1], b)
r.res.addf("[$1, $2]", [a.res, b.res])
if it[0].typ.kind == tyBool:
r.res.addf("$1, $2", [a.res, b.res])
else:
r.res.addf("[$1, $2]", [a.res, b.res])
else:
gen(p, it, a)
r.res.add(a.res)