summary refs log tree commit diff stats
path: root/tests/specialops/tcallops.nim
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2023-02-19 14:49:19 +0800
committerGitHub <noreply@github.com>2023-02-19 14:49:19 +0800
commite896977bd16b2471e4aaaa363690622420e99acc (patch)
tree9c790befa78f8ce56f02f0d81282422b21539c3e /tests/specialops/tcallops.nim
parent6b93db7070c984121e18b502d938d5e455d4ba70 (diff)
downloadNim-e896977bd16b2471e4aaaa363690622420e99acc.tar.gz
closes #1072; add a test case (#21396)
Diffstat (limited to 'tests/specialops/tcallops.nim')
-rw-r--r--tests/specialops/tcallops.nim10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/specialops/tcallops.nim b/tests/specialops/tcallops.nim
index 0508a37a1..c541a0c1d 100644
--- a/tests/specialops/tcallops.nim
+++ b/tests/specialops/tcallops.nim
@@ -37,3 +37,13 @@ doAssert a(b) == "(12)"
 doAssert a.b(c) == `()`(b, a, c)
 doAssert (a.b)(c) == `()`(a.b, c)
 doAssert `()`(a.b, c) == `()`(`()`(b, a), c)
+
+block: # bug #1072
+  var x: int
+
+  proc foo(some:int):int = some
+  proc `()`(l,r:string): string = discard
+
+  block:
+    var foo = 42
+    doAssert x.foo == 0