nimpretty: fixes #9144

This commit is contained in:
Andreas Rumpf
2018-10-16 17:21:41 +02:00
parent f3c0703b7d
commit 778e4d1775
3 changed files with 10 additions and 0 deletions

View File

@@ -52,6 +52,7 @@ proc openEmitter*(em: var Emitter, cache: IdentCache;
em.content = newStringOfCap(16_000)
em.indentStack = newSeqOfCap[int](30)
em.indentStack.add 0
em.lastLineNumber = 1
proc closeEmitter*(em: var Emitter) =
var f = llStreamOpen(em.config.outFile, fmWrite)

View File

@@ -0,0 +1,4 @@
var x: int = 2
echo x # bug #9144

View File

@@ -0,0 +1,5 @@
var x: int = 2
echo x
# bug #9144