Remove confusing <//> (#17830)

This commit is contained in:
flywind
2021-04-26 15:04:52 +08:00
committed by GitHub
parent 9e6f2d7d18
commit 68e522ecec
7 changed files with 29 additions and 31 deletions

View File

@@ -25,8 +25,13 @@ putEnv("HEAPTRASHING", "Indeed")
let s1 = getAllocStats()
proc newTableOwned[A, B](initialSize = defaultInitialSize): owned(TableRef[A, B]) =
new(result)
result[] = initTable[A, B](initialSize)
proc main =
var w = newTable[string, owned Node]()
var w = newTableOwned[string, owned Node]()
w["key"] = Node(field: "value")
echo w["key"][]
echo getEnv("HEAPTRASHING")