diff --git a/compiler/layouter.nim b/compiler/layouter.nim index b801a0273b..8605ade456 100644 --- a/compiler/layouter.nim +++ b/compiler/layouter.nim @@ -246,7 +246,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 9202de703d..9a0f9a49bb 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 6d000d524e..8ea7ca4dd6 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)