closes #1072; add a test case (#21396)

This commit is contained in:
ringabout 2023-02-19 14:49:19 +08:00 • committed by GitHub
commit e896977bd1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,3 +37,13 @@ doAssert a(b) == "(12)"
doAssert a.b(c) == `()`(b, a, c) doAssert a.b(c) == `()`(b, a, c)
doAssert (a.b)(c) == `()`(a.b, c) doAssert (a.b)(c) == `()`(a.b, c)
doAssert `()`(a.b, c) == `()`(`()`(b, a), 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