added tests
This commit is contained in:
parent
6c20509121
commit
b34b1dbc6c
7 changed files with 172 additions and 0 deletions
16
tests/accept/compile/tdictdestruct.nim
Normal file
16
tests/accept/compile/tdictdestruct.nim
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
|
||||
type
|
||||
TDict[TK, TV] = object
|
||||
k: TK
|
||||
v: TV
|
||||
PDict[TK, TV] = ref TDict[TK, TV]
|
||||
|
||||
proc destroyDict[TK, TV](a : PDict[TK, TV]) =
|
||||
return
|
||||
proc newDict[TK, TV](a: TK, b: TV): PDict[TK, TV] =
|
||||
new(result, destroyDict)
|
||||
|
||||
|
||||
discard newDict("a", "b")
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue