From 8dadeebd084bb554b928c822abb43906766bf06d Mon Sep 17 00:00:00 2001 From: Araq Date: Wed, 22 Apr 2015 20:33:06 +0200 Subject: fix #2585 properly --- compiler/parampatterns.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'compiler') diff --git a/compiler/parampatterns.nim b/compiler/parampatterns.nim index 55b4bf213..b7fe269df 100644 --- a/compiler/parampatterns.nim +++ b/compiler/parampatterns.nim @@ -184,12 +184,14 @@ proc isAssignable*(owner: PSym, n: PNode): TAssignableResult = case n.kind of nkSym: # don't list 'skLet' here: - if n.sym.kind in {skVar, skResult, skTemp, skParam}: + if n.sym.kind in {skVar, skResult, skTemp}: if owner != nil and owner.id == n.sym.owner.id and sfGlobal notin n.sym.flags: result = arLocalLValue else: result = arLValue + elif n.sym.kind == skParam and n.sym.typ.kind == tyVar: + result = arLValue elif n.sym.kind == skType: let t = n.sym.typ.skipTypes({tyTypeDesc}) if t.kind == tyVar: result = arStrange -- cgit 1.4.1-2-gfad0