diff options
author | Araq <rumpf_a@web.de> | 2014-07-15 09:30:58 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-07-15 09:30:58 +0200 |
commit | 0743f78012e954f5295df7923ccabd472a5a7502 (patch) | |
tree | 5d681c9835f01019e8ae83e14c0cd49d1a6c0d38 /compiler/parampatterns.nim | |
parent | 7fa399f51c39e6661876223009d5003cd2e0cf99 (diff) | |
parent | 18ded6c23d72cd21fa0aa10ff61dc6f9af40832c (diff) | |
download | Nim-0743f78012e954f5295df7923ccabd472a5a7502.tar.gz |
Merge branch 'master' of https://github.com/Araq/Nimrod
Diffstat (limited to 'compiler/parampatterns.nim')
-rw-r--r-- | compiler/parampatterns.nim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/parampatterns.nim b/compiler/parampatterns.nim index e94068776..bbdba8c22 100644 --- a/compiler/parampatterns.nim +++ b/compiler/parampatterns.nim @@ -10,7 +10,7 @@ ## This module implements the pattern matching features for term rewriting ## macro support. -import strutils, ast, astalgo, types, msgs, idents, renderer, wordrecg +import strutils, ast, astalgo, types, msgs, idents, renderer, wordrecg, trees # we precompile the pattern here for efficiency into some internal # stack based VM :-) Why? Because it's fun; I did no benchmarks to see if that @@ -215,6 +215,9 @@ proc isAssignable*(owner: PSym, n: PNode): TAssignableResult = result = arLValue of nkObjUpConv, nkObjDownConv, nkCheckedFieldExpr: result = isAssignable(owner, n.sons[0]) + of nkCallKinds: + # builtin slice keeps lvalue-ness: + if getMagic(n) == mSlice: result = isAssignable(owner, n.sons[1]) else: discard |