summary refs log tree commit diff stats
path: root/compiler/cgen.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/cgen.nim')
-rwxr-xr-xcompiler/cgen.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/cgen.nim b/compiler/cgen.nim
index 7e16042f8..671fdd05f 100755
--- a/compiler/cgen.nim
+++ b/compiler/cgen.nim
@@ -544,7 +544,7 @@ proc genProcAux(m: BModule, prc: PSym) =
   for i in countup(1, sonsLen(prc.typ.n) - 1): 
     var param = prc.typ.n.sons[i].sym
     assignParam(p, param)
-  genStmts(p, prc.ast.sons[codePos]) # modifies p.locals, p.init, etc.
+  genStmts(p, prc.getBody) # modifies p.locals, p.init, etc.
   var generatedProc: PRope
   if sfPure in prc.flags: 
     generatedProc = ropeff("$1 {$n$2$3$4}$n", "define $1 {$n$2$3$4}$n",