summary refs log tree commit diff stats
path: root/compiler/ccgexprs.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-09-15 20:32:20 +0200
committerAraq <rumpf_a@web.de>2018-09-15 20:32:20 +0200
commit0e33a8676e325fa4174893291ed41d59b689c577 (patch)
tree7f747fd449659c1fab08b80dde84dd3fc5d11c5c /compiler/ccgexprs.nim
parent7df722844b8f7a6f56c098677abda98e852a1761 (diff)
parentb9b611a2b97bbdf573c03e56205ce0ad08aa168e (diff)
downloadNim-0e33a8676e325fa4174893291ed41d59b689c577.tar.gz
Merge branch 'devel' of github.com:nim-lang/Nim into devel
Diffstat (limited to 'compiler/ccgexprs.nim')
-rw-r--r--compiler/ccgexprs.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim
index 56ecf5ba3..a7a28a51c 100644
--- a/compiler/ccgexprs.nim
+++ b/compiler/ccgexprs.nim
@@ -1596,10 +1596,11 @@ proc genSwap(p: BProc, e: PNode, d: var TLoc) =
   genAssignment(p, a, b, {})
   genAssignment(p, b, tmp, {})
 
-proc rdSetElemLoc(conf: ConfigRef; a: TLoc, setType: PType): Rope =
+proc rdSetElemLoc(conf: ConfigRef; a: TLoc, typ: PType): Rope =
   # read a location of an set element; it may need a subtraction operation
   # before the set operation
   result = rdCharLoc(a)
+  let setType = typ.skipTypes(abstractPtrs)
   assert(setType.kind == tySet)
   if firstOrd(conf, setType) != 0:
     result = "($1- $2)" % [result, rope(firstOrd(conf, setType))]