diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-07-13 07:55:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-13 07:55:56 +0200 |
commit | de1ede77fe91170269d5bf54a01e61ff95f6dc56 (patch) | |
tree | 755f30896c35433e0589c8821cec5c2dcd58b9f6 /tests/distinct | |
parent | d55cc0888d1140e4bdac0beacba424f8e767da7c (diff) | |
download | Nim-de1ede77fe91170269d5bf54a01e61ff95f6dc56.tar.gz |
fixes #11715 (#11721)
Diffstat (limited to 'tests/distinct')
-rw-r--r-- | tests/distinct/tdistinct.nim | 8 |
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 |