diff options
author | Araq <rumpf_a@web.de> | 2011-06-21 01:52:42 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-06-21 01:52:42 +0200 |
commit | db0a4a9f86d167faccbd50f3f12f9de470e516b8 (patch) | |
tree | ae9e52d63139488beb59b926a7f735590ef7ef2c /compiler | |
parent | cfb107f3466b185f97c2d33d09a9e6dfa0b6e6b6 (diff) | |
download | Nim-db0a4a9f86d167faccbd50f3f12f9de470e516b8.tar.gz |
bugfix: shallowCopy should not break bootstrapping anymore; encodings.nim for windows improved
Diffstat (limited to 'compiler')
-rwxr-xr-x | compiler/semexprs.nim | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 67ad158f4..3841ae9fb 100755 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -850,11 +850,15 @@ proc semMagic(c: PContext, n: PNode, s: PSym, flags: TExprFlags): PNode = if semthreads.needsGlobalAnalysis(): c.threadEntries.add(result) of mShallowCopy: - checkSonsLen(n, 3) - result = newNodeI(nkFastAsgn, n.info) - result.add(n[1]) - result.add(n[2]) - result = semAsgn(c, result) + if sonsLen(n) == 3: + # XXX ugh this is really a hack: shallowCopy() can be overloaded only + # with procs that take not 2 parameters: + result = newNodeI(nkFastAsgn, n.info) + result.add(n[1]) + result.add(n[2]) + result = semAsgn(c, result) + else: + result = semDirectOp(c, n, flags) else: result = semDirectOp(c, n, flags) proc semIfExpr(c: PContext, n: PNode): PNode = |