diff options
-rw-r--r-- | compiler/layouter.nim | 2 | ||||
-rw-r--r-- | nimpretty/tests/exhaustive.nim | 3 | ||||
-rw-r--r-- | nimpretty/tests/expected/exhaustive.nim | 3 |
3 files changed, 7 insertions, 1 deletions
diff --git a/compiler/layouter.nim b/compiler/layouter.nim index f96f88da1..ad4eb7488 100644 --- a/compiler/layouter.nim +++ b/compiler/layouter.nim @@ -245,7 +245,7 @@ proc emitTok*(em: var Emitter; L: TLexer; tok: TToken) = wr(TokTypeToStr[tok.tokType]) if not em.inquote: wr(" ") of tkOpr, tkDotDot: - if tok.strongSpaceA == 0 and tok.strongSpaceB == 0: + if (tok.strongSpaceA == 0 and tok.strongSpaceB == 0) or em.inquote: # bug #9504: remember to not spacify a keyword: lastTokWasTerse = true # if not surrounded by whitespace, don't produce any whitespace either: diff --git a/nimpretty/tests/exhaustive.nim b/nimpretty/tests/exhaustive.nim index 9202de703..9a0f9a49b 100644 --- a/nimpretty/tests/exhaustive.nim +++ b/nimpretty/tests/exhaustive.nim @@ -357,3 +357,6 @@ proc fun3() = ##[ foobar ]## + +# bug #9673 +discard `* `(1, 2) diff --git a/nimpretty/tests/expected/exhaustive.nim b/nimpretty/tests/expected/exhaustive.nim index 6d000d524..8ea7ca4dd 100644 --- a/nimpretty/tests/expected/exhaustive.nim +++ b/nimpretty/tests/expected/exhaustive.nim @@ -366,3 +366,6 @@ proc fun3() = ##[ foobar ]## + +# bug #9673 +discard `*`(1, 2) |