diff options
author | Araq <rumpf_a@web.de> | 2016-10-08 10:06:55 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2016-10-08 10:47:47 +0200 |
commit | 7906527297057be52406b3080fbfd62048ae92c8 (patch) | |
tree | f555e042453b6d80f929560c3351a2b21b7b6cb8 | |
parent | 80ad3d3441ad939e6f7ff14e6370dcce4d58e6ec (diff) | |
download | Nim-7906527297057be52406b3080fbfd62048ae92c8.tar.gz |
failed attempt to fix a 'void' inference bug
-rw-r--r-- | compiler/sigmatch.nim | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index b8dfede1f..df5a76a57 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -1567,8 +1567,13 @@ proc paramTypesMatch*(m: var TCandidate, f, a: PType, proc setSon(father: PNode, at: int, son: PNode) = - if sonsLen(father) <= at: setLen(father.sons, at + 1) + let oldLen = father.len + if oldLen <= at: + setLen(father.sons, at + 1) father.sons[at] = son + # insert potential 'void' parameters: + #for i in oldLen ..< at: + # father.sons[i] = newNodeIT(nkEmpty, son.info, getSysType(tyVoid)) # we are allowed to modify the calling node in the 'prepare*' procs: proc prepareOperand(c: PContext; formal: PType; a: PNode): PNode = |