diff options
author | Ganesh Viswanathan <dev@genotrance.com> | 2018-09-15 14:33:15 -0500 |
---|---|---|
committer | Ganesh Viswanathan <dev@genotrance.com> | 2018-09-15 14:33:15 -0500 |
commit | e4fa1c81cb555a726fa79133bb20e938e8c68b02 (patch) | |
tree | 1185eab4bd2c2e66567c2dba0fe988355595ceb3 /compiler/ccgexprs.nim | |
parent | b966945ab219e58023cdf85c77804519c96c231e (diff) | |
parent | 0e33a8676e325fa4174893291ed41d59b689c577 (diff) | |
download | Nim-e4fa1c81cb555a726fa79133bb20e938e8c68b02.tar.gz |
Merge remote-tracking branch 'upstream/devel' into test-6434
Diffstat (limited to 'compiler/ccgexprs.nim')
-rw-r--r-- | compiler/ccgexprs.nim | 3 |
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))] |