diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-03-22 13:42:23 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-03-22 13:42:23 +0100 |
commit | 709b0aeb8d816322404ddd56ec2edfef80641742 (patch) | |
tree | e27b1f64825da431dd0c8f1cccd8b626624a4e33 /lib | |
parent | 4457b0980fc974efae25c539bad98b9b971299db (diff) | |
parent | 308b7c01381daa347558d3965510c73e3adebb5f (diff) | |
download | Nim-709b0aeb8d816322404ddd56ec2edfef80641742.tar.gz |
Merge pull request #3990 from yglukhov/js-tables-fix
Fixed Table::del in JS
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/collections/tableimpl.nim | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/pure/collections/tableimpl.nim b/lib/pure/collections/tableimpl.nim index beafe1109..e4ec05b1c 100644 --- a/lib/pure/collections/tableimpl.nim +++ b/lib/pure/collections/tableimpl.nim @@ -129,4 +129,7 @@ template delImpl() {.dirty, immediate.} = r = t.data[i].hcode and msk # "home" location of key@i if not ((i >= r and r > j) or (r > j and j > i) or (j > i and i >= r)): break - shallowCopy(t.data[j], t.data[i]) # data[j] will be marked EMPTY next loop + when defined(js): + t.data[j] = t.data[i] + else: + shallowCopy(t.data[j], t.data[i]) # data[j] will be marked EMPTY next loop |