nimpretty: fixes #9144

(cherry picked from commit 778e4d1775)
This commit is contained in:
Andreas Rumpf
2018-10-16 17:21:41 +02:00
committed by narimiran
parent 06b1d17134
commit e0eda28a99
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