diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2022-10-14 05:37:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-13 23:37:41 +0200 |
commit | 6082b9ea5d4907e7ad8dfb66289d164a7cbdab42 (patch) | |
tree | 50935de82cf872036ba9f849900f4c600766f02c /nimpretty | |
parent | 169d3fda0020ec5c904f70f9026a2d3bd59f9599 (diff) | |
download | Nim-6082b9ea5d4907e7ad8dfb66289d164a7cbdab42.tar.gz |
fixes #20553; don't format code for stropping identifier (#20561) [backport]
* fixes #20553; don't format code for stropping identifier * add tests * Update nimpretty/tests/expected/simple.nim
Diffstat (limited to 'nimpretty')
-rw-r--r-- | nimpretty/tests/expected/simple.nim | 11 | ||||
-rw-r--r-- | nimpretty/tests/simple.nim | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/nimpretty/tests/expected/simple.nim b/nimpretty/tests/expected/simple.nim index d13558621..e711eb3b6 100644 --- a/nimpretty/tests/expected/simple.nim +++ b/nimpretty/tests/expected/simple.nim @@ -16,3 +16,14 @@ proc a() = discard ## comment 3 discard # comment 4 + + +# bug #20553 + +let `'hello` = 12 +echo `'hello` + + +proc `'u4`(n: string) = + # The leading ' is required. + discard diff --git a/nimpretty/tests/simple.nim b/nimpretty/tests/simple.nim index 435bd6bd2..2a01a176e 100644 --- a/nimpretty/tests/simple.nim +++ b/nimpretty/tests/simple.nim @@ -16,3 +16,14 @@ proc a() = discard## comment 3 discard # comment 4 + + +# bug #20553 + +let `'hello` = 12 +echo `'hello` + + +proc `'u4`(n: string) = + # The leading ' is required. + discard |