summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/cgmeth.nim1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/cgmeth.nim b/compiler/cgmeth.nim
index 948541302..9755bc674 100644
--- a/compiler/cgmeth.nim
+++ b/compiler/cgmeth.nim
@@ -100,6 +100,7 @@ proc methodDef*(s: PSym, fromCache: bool) =
     if disp.typ.callConv == ccInline: disp.typ.callConv = ccDefault
     disp.ast = copyTree(s.ast)
     disp.ast.sons[bodyPos] = ast.emptyNode
+    disp.loc.r = nil
     if s.typ.sons[0] != nil: 
       disp.ast.sons[resultPos].sym = copySym(s.ast.sons[resultPos].sym)
     attachDispatcher(s, newSymNode(disp))