diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-05-22 11:50:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-22 11:50:05 +0200 |
commit | 1e97b420bb10af94450582cbf6774cacc45c92f4 (patch) | |
tree | 75b10571cf21b7a9f9748ee365e7dd5edb19614d /tests/distinct/tdistinct.nim | |
parent | 57bc8d73b439d974760937c6866d16afc742a25c (diff) | |
download | Nim-1e97b420bb10af94450582cbf6774cacc45c92f4.tar.gz |
fixes #7167 (#11300)
* fixes #7167 * spec: distinct types can be ordinal types * bootstrapping issue
Diffstat (limited to 'tests/distinct/tdistinct.nim')
-rw-r--r-- | tests/distinct/tdistinct.nim | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/distinct/tdistinct.nim b/tests/distinct/tdistinct.nim index 70e586ded..c6bfb2490 100644 --- a/tests/distinct/tdistinct.nim +++ b/tests/distinct/tdistinct.nim @@ -2,6 +2,10 @@ discard """ output: ''' tdistinct 25 +false +false +false +false ''' """ @@ -83,3 +87,14 @@ type const d: DistTup = DistTup(( foo:"FOO", bar:"BAR" )) + + +# bug #7167 + +type Id = distinct range[0..3] + +proc `<=`(a, b: Id): bool {.borrow.} + +var xs: array[Id, bool] + +for x in xs: echo x # type mismatch: got (T) but expected 'bool' |