summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/parampatterns.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/parampatterns.nim b/compiler/parampatterns.nim
index 33881a7b3..e97631b77 100644
--- a/compiler/parampatterns.nim
+++ b/compiler/parampatterns.nim
@@ -200,7 +200,7 @@ proc exprRoot*(n: PNode): PSym =
       if it.len > 0 and it.typ != nil: it = it.lastSon
       else: break
     of nkCallKinds:
-      if it.typ != nil and it.typ.kind == tyVar and it.len > 1:
+      if it.typ != nil and it.typ.kind in {tyVar, tyLent} and it.len > 1:
         # See RFC #7373, calls returning 'var T' are assumed to
         # return a view into the first argument (if there is one):
         it = it[1]