diff options
author | cooldome <ariabushenko@gmail.com> | 2020-09-10 11:40:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-10 12:40:39 +0200 |
commit | 61c85e034de571cb25020b6dddf662c82896907a (patch) | |
tree | d2fe2037bf016452c3a468e8bc21c70d22340c98 | |
parent | 3f00a738dbc8319b4dd2b86bf5529c096f2dd243 (diff) | |
download | Nim-61c85e034de571cb25020b6dddf662c82896907a.tar.gz |
Fix #15286 (#15292)
* fix #15286 * fix spacing
-rw-r--r-- | compiler/injectdestructors.nim | 3 | ||||
-rw-r--r-- | tests/arc/t14383.nim | 8 |
2 files changed, 11 insertions, 0 deletions
diff --git a/compiler/injectdestructors.nim b/compiler/injectdestructors.nim index 4fe4cb1da..b8b8e776e 100644 --- a/compiler/injectdestructors.nim +++ b/compiler/injectdestructors.nim @@ -728,6 +728,9 @@ proc p(n: PNode; c: var Con; s: var Scope; mode: ProcessMode): PNode = for i in ord(n.kind in {nkObjConstr, nkClosure})..<n.len: if n[i].kind == nkExprColonExpr: result[i][1] = p(n[i][1], c, s, m) + elif n[i].kind == nkRange: + result[i][0] = p(n[i][0], c, s, m) + result[i][1] = p(n[i][1], c, s, m) else: result[i] = p(n[i], c, s, m) if mode == normal and isRefConstr: diff --git a/tests/arc/t14383.nim b/tests/arc/t14383.nim index 412e11326..78afc58e2 100644 --- a/tests/arc/t14383.nim +++ b/tests/arc/t14383.nim @@ -43,3 +43,11 @@ proc varArg(lst: var seq[string]) = var x = @["a", "b"] varArg(x) echo x + + +#------------------------------------------------------------------------------ +# Issue #15286 +#------------------------------------------------------------------------------ + +import std/os +discard getFileInfo(".") \ No newline at end of file |