diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-07-11 20:45:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-11 20:45:28 +0200 |
commit | 51c77e09fdad00f1ca51f6464eb3feb5297bb336 (patch) | |
tree | 34faa653fa94e5878c7afc2dd66e3f9d171206bf /compiler | |
parent | fba673ce150754298ea2f582868feb6831ed07c9 (diff) | |
parent | 023f1da40a1343dab0e3d8d2f1ef3bf08b55f91a (diff) | |
download | Nim-51c77e09fdad00f1ca51f6464eb3feb5297bb336.tar.gz |
Merge pull request #4477 from kierdavis/4475-segfault
Fix #4475
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/sigmatch.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 511a44954..8c8c83d0f 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -1746,8 +1746,8 @@ proc matches*(c: PContext, n, nOrig: PNode, m: var TCandidate) = if formal.ast == nil: if formal.typ.kind == tyVarargs: var container = newNodeIT(nkBracket, n.info, arrayConstr(c, n.info)) - addSon(m.call, implicitConv(nkHiddenStdConv, formal.typ, - container, m, c)) + setSon(m.call, formal.position + 1, + implicitConv(nkHiddenStdConv, formal.typ, container, m, c)) else: # no default value m.state = csNoMatch |