mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +00:00
(cherry picked from commit d4782c9e42)
This commit is contained in:
@@ -445,3 +445,15 @@ static:
|
||||
needSecondIdentifier.mgetOrPut(firstPart, @[]).add((name, pattern))
|
||||
|
||||
doAssert needSecondIdentifier[0] == @[("aaaa", "bbbb"), ("aaaaa", "bbbbb"), ("aaaaaa", "bbbbbb"), ("aaaaaaa", "bbbbbbb"), ("aaaaaaaa", "bbbbb")]
|
||||
|
||||
# bug #17864
|
||||
macro transform*(fn: typed) =
|
||||
quote do:
|
||||
`fn`
|
||||
|
||||
var map: Table[string, HashSet[string]]
|
||||
proc publish*(): void {.transform.} =
|
||||
map["k"] = init_hash_set[string]()
|
||||
map["k"].incl "d"
|
||||
|
||||
publish()
|
||||
|
||||
Reference in New Issue
Block a user