mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
nimpretty: fixes #9144
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user