diff options
-rw-r--r-- | compiler/renderer.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/renderer.nim b/compiler/renderer.nim index 41078716b..3a6d0ae65 100644 --- a/compiler/renderer.nim +++ b/compiler/renderer.nim @@ -864,7 +864,7 @@ proc gproc(g: var TSrcGen, n: PNode) = if renderNoPragmas notin g.flags: gsub(g, n[pragmasPos]) if renderNoBody notin g.flags: - if n[bodyPos].kind != nkEmpty: + if n.len > bodyPos and n[bodyPos].kind != nkEmpty: put(g, tkSpaces, Space) putWithSpace(g, tkEquals, "=") indentNL(g) |