diff options
author | Yuriy Glukhov <yuriy.glukhov@gmail.com> | 2016-09-20 17:00:16 +0300 |
---|---|---|
committer | Yuriy Glukhov <yuriy.glukhov@gmail.com> | 2016-09-20 17:01:53 +0300 |
commit | 82b022ebc6621f573c516ea59e9db4426d87a64e (patch) | |
tree | aa8cf9145240dbf5639e8359c4b35a42f6940f44 /tests/js/tbyvar.nim | |
parent | 09651bec5e0988a5f712049fdc0f9b41e7e37e98 (diff) | |
download | Nim-82b022ebc6621f573c516ea59e9db4426d87a64e.tar.gz |
JS: Fixed ICE on ptr assignment
Diffstat (limited to 'tests/js/tbyvar.nim')
-rw-r--r-- | tests/js/tbyvar.nim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/js/tbyvar.nim b/tests/js/tbyvar.nim index 9714cd56b..40aebd13b 100644 --- a/tests/js/tbyvar.nim +++ b/tests/js/tbyvar.nim @@ -41,3 +41,11 @@ proc bar(s: var seq[int], a: int) = foo(s) s.bar(5) doAssert(s == @[123, 1]) + +import tables +block: # Test get addr of byvar return value + var t = initTable[string, int]() + t["hi"] = 5 + let a = addr t["hi"] + a[] = 10 + doAssert(t["hi"] == 10) |