Skip to content

Commit

Permalink
closes nim-lang#17864; add a test case (nim-lang#21434)
Browse files Browse the repository at this point in the history
  • Loading branch information
ringabout authored and bung87 committed Jul 29, 2023
1 parent d82bf65 commit 89dacbf
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/vm/tmisc_vm.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 89dacbf

Please sign in to comment.