nimpretty: fixes #9144
This commit is contained in:
parent
f3c0703b7d
commit
778e4d1775
3 changed files with 10 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
4
nimpretty/tests/expected/simple.nim
Normal file
4
nimpretty/tests/expected/simple.nim
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
var x: int = 2
|
||||
|
||||
echo x # bug #9144
|
||||
5
nimpretty/tests/simple.nim
Normal file
5
nimpretty/tests/simple.nim
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
var x: int = 2
|
||||
|
||||
echo x
|
||||
# bug #9144
|
||||
Loading…
Add table
Add a link
Reference in a new issue