summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2020-07-08 10:45:51 +0200
committerAndreas Rumpf <rumpf_a@web.de>2020-07-08 12:22:55 +0200
commite42ce877a6469ccc6eb99e1e0f6162aeb6839193 (patch)
treeb637de796850863fbef8480a92b71cc1ef9f5eeb /compiler
parentecf8cbbbe0be3cc722d59bdfbfffd3994f136c0e (diff)
downloadNim-e42ce877a6469ccc6eb99e1e0f6162aeb6839193.tar.gz
fixes #14805
Diffstat (limited to 'compiler')
-rw-r--r--compiler/ccgtypes.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/ccgtypes.nim b/compiler/ccgtypes.nim
index 11743499d..fb205110e 100644
--- a/compiler/ccgtypes.nim
+++ b/compiler/ccgtypes.nim
@@ -279,7 +279,7 @@ proc ccgIntroducedPtr(conf: ConfigRef; s: PSym, retType: PType): bool =
     result = false
   # first parameter and return type is 'lent T'? --> use pass by pointer
   if s.position == 0 and retType != nil and retType.kind == tyLent:
-    result = true
+    result = pt.kind != tyVar
 
 proc fillResult(conf: ConfigRef; param: PNode) =
   fillLoc(param.sym.loc, locParam, param, ~"Result",