diff options
author | Oscar NihlgÄrd <oscarnihlgard@gmail.com> | 2018-06-04 13:38:26 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-06-04 13:38:26 +0200 |
commit | 440212a154ba26a633fa1360ed1f7bb29b274026 (patch) | |
tree | 84716604fb441bd7781458ee4b23544e1fcd3ba9 /tests | |
parent | 59ba1e77afeddc172dbc09edc752c9725c8cfdf5 (diff) | |
download | Nim-440212a154ba26a633fa1360ed1f7bb29b274026.tar.gz |
Fix for newStringOfCap in VM (#7901)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/vm/tvmmisc.nim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/vm/tvmmisc.nim b/tests/vm/tvmmisc.nim index 472660bc2..4af824cf4 100644 --- a/tests/vm/tvmmisc.nim +++ b/tests/vm/tvmmisc.nim @@ -82,3 +82,11 @@ block: assert fileExists("MISSINGFILE") == false assert dirExists("MISSINGDIR") == false + +# #7210 +block: + static: + proc f(size: int): int = + var some = newStringOfCap(size) + result = size + doAssert f(4) == 4 \ No newline at end of file |