From 34b826a64dec8fd575e44ece2efba0d2cdf41311 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Tue, 18 Oct 2016 18:22:41 +0200 Subject: [PATCH] fixes #4608 --- compiler/parampatterns.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/parampatterns.nim b/compiler/parampatterns.nim index f8f1f355cc..c51d406acc 100644 --- a/compiler/parampatterns.nim +++ b/compiler/parampatterns.nim @@ -230,6 +230,8 @@ proc isAssignable*(owner: PSym, n: PNode; isUnsafeAddr=false): TAssignableResult # builtin slice keeps lvalue-ness: if getMagic(n) in {mArrGet, mSlice}: result = isAssignable(owner, n.sons[1], isUnsafeAddr) + elif n.typ != nil and n.typ.kind == tyVar: + result = arLValue of nkStmtList, nkStmtListExpr: if n.typ != nil: result = isAssignable(owner, n.lastSon, isUnsafeAddr)