summary refs log tree commit diff stats
path: root/tests/generics/texplicitgeneric2.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/generics/texplicitgeneric2.nim')
-rw-r--r--tests/generics/texplicitgeneric2.nim8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/generics/texplicitgeneric2.nim b/tests/generics/texplicitgeneric2.nim
index c4af17b7b..37b133130 100644
--- a/tests/generics/texplicitgeneric2.nim
+++ b/tests/generics/texplicitgeneric2.nim
@@ -1,6 +1,5 @@
 discard """
   output: "Key: 12 value: 12Key: 13 value: 13 Key: A value: 12 Key: B value: 13"
-  disabled: true
 """
 
 # test explicit type instantiation
@@ -14,12 +13,12 @@ proc newDict*[TKey, TValue](): PDict[TKey, TValue] =
   new(result)
   result.data = @[]
 
-proc add*(d: PDict, k: TKey, v: TValue) =
+proc add*(d: PDict, k: d.TKey, v: d.TValue) =
   d.data.add((k, v))
 
 
-#iterator items*(d: PDict): tuple[k: TKey, v: TValue] =
-#  for k, v in items(d.data): yield (k, v)
+iterator items*(d: PDict): tuple[k: d.TKey, v: d.TValue] =
+  for k, v in items(d.data): yield (k, v)
 
 var d = newDict[int, string]()
 d.add(12, "12")
@@ -33,3 +32,4 @@ c.add('B', "13")
 for k, v in items(c):
   stdout.write(" Key: ", $k, " value: ", v)
 
+stdout.write "\n"