Fix for newStringOfCap in VM (#7901)

This commit is contained in:
Oscar Nihlgård 2018-06-04 13:38:26 +02:00 • committed by Andreas Rumpf
commit 440212a154
2 changed files with 10 additions and 1 deletions

View file

@ -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