summary refs log tree commit diff stats
path: root/tests/distinct
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2019-07-13 07:55:56 +0200
committerGitHub <noreply@github.com>2019-07-13 07:55:56 +0200
commitde1ede77fe91170269d5bf54a01e61ff95f6dc56 (patch)
tree755f30896c35433e0589c8821cec5c2dcd58b9f6 /tests/distinct
parentd55cc0888d1140e4bdac0beacba424f8e767da7c (diff)
downloadNim-de1ede77fe91170269d5bf54a01e61ff95f6dc56.tar.gz
fixes #11715 (#11721)
Diffstat (limited to 'tests/distinct')
-rw-r--r--tests/distinct/tdistinct.nim8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/distinct/tdistinct.nim b/tests/distinct/tdistinct.nim
index c6bfb2490..2c0196745 100644
--- a/tests/distinct/tdistinct.nim
+++ b/tests/distinct/tdistinct.nim
@@ -6,6 +6,7 @@ false
 false
 false
 false
+Foo
 '''
 """
 
@@ -98,3 +99,10 @@ proc `<=`(a, b: Id): bool {.borrow.}
 var xs: array[Id, bool]
 
 for x in xs: echo x # type mismatch: got (T) but expected 'bool'
+
+# bug #11715
+
+type FooD = distinct int
+proc `<=`(a, b: FooD): bool {.borrow.}
+
+for f in [FooD(0): "Foo"]: echo f