summary refs log tree commit diff stats
path: root/nimpretty/tests/expected
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2019-06-13 10:58:27 +0200
committerAraq <rumpf_a@web.de>2019-06-13 10:58:27 +0200
commit165ea4628486476793d774aee011d84183e6fc96 (patch)
tree938e5384a4f0897be1617ce4f8a5099308745e4f /nimpretty/tests/expected
parentaf39f26a3a8340fdfff7b86d7b2b3506e59cfc16 (diff)
downloadNim-165ea4628486476793d774aee011d84183e6fc96.tar.gz
[bugfix] nimpretty: fixes #11470
Diffstat (limited to 'nimpretty/tests/expected')
-rw-r--r--nimpretty/tests/expected/exhaustive.nim15
1 files changed, 15 insertions, 0 deletions
diff --git a/nimpretty/tests/expected/exhaustive.nim b/nimpretty/tests/expected/exhaustive.nim
index 6089c34c6..4e90faa25 100644
--- a/nimpretty/tests/expected/exhaustive.nim
+++ b/nimpretty/tests/expected/exhaustive.nim
@@ -427,3 +427,18 @@ proc isValid1*[A](s: HashSet[A]): bool {.deprecated:
   ## <#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