summary refs log tree commit diff stats
path: root/nimpretty
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-06-13 10:42:37 +0200
committerAraq <rumpf_a@web.de>2019-06-13 10:42:37 +0200
commitaf39f26a3a8340fdfff7b86d7b2b3506e59cfc16 (patch)
tree61275b954068be50bc882b379f1f502fff7f20fb /nimpretty
parentb70295c768b25ae956a849b7ff15c7801d76607e (diff)
downloadNim-af39f26a3a8340fdfff7b86d7b2b3506e59cfc16.tar.gz
[bugfix] nimpretty: fixes #11468
Diffstat (limited to 'nimpretty')
-rw-r--r--nimpretty/tests/exhaustive.nim8
-rw-r--r--nimpretty/tests/expected/exhaustive.nim8
2 files changed, 16 insertions, 0 deletions
diff --git a/nimpretty/tests/exhaustive.nim b/nimpretty/tests/exhaustive.nim
index 2f8fe03f2..e8458d123 100644
--- a/nimpretty/tests/exhaustive.nim
+++ b/nimpretty/tests/exhaustive.nim
@@ -409,3 +409,11 @@ type
     ccFastCall,               # fastcall (pass parameters in registers)
     ccClosure,        # proc has a closure
     ccNoConvention       # needed for generating proper C procs sometimes
+
+
+proc isValid1*[A](s: HashSet[A]): bool {.deprecated:
+    "Deprecated since v0.20; sets are initialized by default".} =
+  ## Returns `true` if the set has been initialized (with `initHashSet proc
+  ## <#initHashSet,int>`_ or `init proc <#init,HashSet[A],int>`_).
+  result = s.data.len > 0
+  # bug #11468
diff --git a/nimpretty/tests/expected/exhaustive.nim b/nimpretty/tests/expected/exhaustive.nim
index 75580081d..6089c34c6 100644
--- a/nimpretty/tests/expected/exhaustive.nim
+++ b/nimpretty/tests/expected/exhaustive.nim
@@ -419,3 +419,11 @@ type
     ccFastCall,    # fastcall (pass parameters in registers)
     ccClosure,     # proc has a closure
     ccNoConvention # needed for generating proper C procs sometimes
+
+
+proc isValid1*[A](s: HashSet[A]): bool {.deprecated:
+    "Deprecated since v0.20; sets are initialized by default".} =
+  ## Returns `true` if the set has been initialized (with `initHashSet proc
+  ## <#initHashSet,int>`_ or `init proc <#init,HashSet[A],int>`_).
+  result = s.data.len > 0
+  # bug #11468