diff options
author | Araq <rumpf_a@web.de> | 2015-04-22 20:33:06 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-04-22 20:33:06 +0200 |
commit | 8dadeebd084bb554b928c822abb43906766bf06d (patch) | |
tree | c7588a23118e67e6f28fa77d8fe75b02ab850c22 /compiler | |
parent | bcd8053b2309ab33240cf73c280f73699c59ea1d (diff) | |
download | Nim-8dadeebd084bb554b928c822abb43906766bf06d.tar.gz |
fix #2585 properly
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/parampatterns.nim | 4 |
1 files changed, 3 insertions, 1 deletions
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 |