summary refs log tree commit diff stats
path: root/nimpretty/tests/expected
diff options
context:
space:
mode:
Diffstat (limited to 'nimpretty/tests/expected')
-rw-r--r--nimpretty/tests/expected/exhaustive.nim23
1 files changed, 23 insertions, 0 deletions
diff --git a/nimpretty/tests/expected/exhaustive.nim b/nimpretty/tests/expected/exhaustive.nim
index 75580081d..4e90faa25 100644
--- a/nimpretty/tests/expected/exhaustive.nim
+++ b/nimpretty/tests/expected/exhaustive.nim
@@ -419,3 +419,26 @@ 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
+
+assert $type(a) == "Option[system.int]"
+foo(a, $type(b), c)
+foo(type(b), c) # this is ok
+
+proc `<`*[A](s, t: A): bool = discard
+proc `==`*[A](s, t: HashSet[A]): bool = discard
+proc `<=`*[A](s, t: HashSet[A]): bool = discard
+
+# these are ok:
+proc `$`*[A](s: HashSet[A]): string = discard
+proc `*`*[A](s1, s2: HashSet[A]): HashSet[A] {.inline.} = discard
+proc `-+-`*[A](s1, s2: HashSet[A]): HashSet[A] {.inline.} = discard
+
+# bug #11470