diff options
author | metagn <metagngn@gmail.com> | 2024-09-18 23:45:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-18 22:45:19 +0200 |
commit | 00ac961ab18c6c8cba9fd2bdad8390816dec1ec8 (patch) | |
tree | d141f2c65f85d9185324fa6eb2f9d4dc99b10bed /compiler | |
parent | 0c3573e4a0628bbaa8b09dcd854bdc2702948bbc (diff) | |
download | Nim-00ac961ab18c6c8cba9fd2bdad8390816dec1ec8.tar.gz |
require `not nil` to be on the same line after a type (#24134)
fixes #23565
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/parser.nim | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/parser.nim b/compiler/parser.nim index eb7b8c289..747505097 100644 --- a/compiler/parser.nim +++ b/compiler/parser.nim @@ -1401,7 +1401,7 @@ proc primary(p: var Parser, mode: PrimaryMode): PNode = result = primarySuffix(p, result, baseInd, mode) proc binaryNot(p: var Parser; a: PNode): PNode = - if p.tok.tokType == tkNot: + if p.tok.tokType == tkNot and p.tok.indent < 0: let notOpr = newIdentNodeP(p.tok.ident, p) getTok(p) optInd(p, notOpr) |