summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2016-01-17 22:18:06 +0100
committerAndreas Rumpf <rumpf_a@web.de>2016-01-17 22:18:06 +0100
commitf92f00b022fd367ded609fd9a8c547377a9ced51 (patch)
treef41c75f85cfc45672352294b27303bb00205a3ad /compiler
parent71cf1f650e2812e43ed5a6edfb36666cfc145fdd (diff)
downloadNim-f92f00b022fd367ded609fd9a8c547377a9ced51.tar.gz
fixes #3665
Diffstat (limited to 'compiler')
-rw-r--r--compiler/nimsets.nim10
1 files changed, 7 insertions, 3 deletions
diff --git a/compiler/nimsets.nim b/compiler/nimsets.nim
index 055bae909..f15ad6368 100644
--- a/compiler/nimsets.nim
+++ b/compiler/nimsets.nim
@@ -106,13 +106,17 @@ proc toTreeSet(s: TBitSet, settype: PType, info: TLineInfo): PNode =
         inc(b)
         if (b >= len(s) * ElemSize) or not bitSetIn(s, b): break
       dec(b)
+      let aa = newIntTypeNode(nkIntLit, a + first, elemType)
+      aa.info = info
       if a == b:
-        addSon(result, newIntTypeNode(nkIntLit, a + first, elemType))
+        addSon(result, aa)
       else:
         n = newNodeI(nkRange, info)
         n.typ = elemType
-        addSon(n, newIntTypeNode(nkIntLit, a + first, elemType))
-        addSon(n, newIntTypeNode(nkIntLit, b + first, elemType))
+        addSon(n, aa)
+        let bb = newIntTypeNode(nkIntLit, b + first, elemType)
+        bb.info = info
+        addSon(n, bb)
         addSon(result, n)
       e = b
     inc(e)
61' href='#n161'>161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192