Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array indexed by distinct int doesnt work with iterators #11715

Closed
Wh1teDuke opened this issue Jul 11, 2019 · 0 comments

Comments

@Wh1teDuke
Copy link
Contributor

commented Jul 11, 2019

Test

type Foo = distinct int
for f in [Foo(0): "Foo"]: echo f

Result

Nim/lib/system/iterators.nim(18, 8) Error: type mismatch: got <range 0..0(Foo), range 0..0(Foo)>
but expected one of: 
proc `<=`[T](x, y: set[T]): bool
[...]

Related #7167


>nim -v
Nim Compiler Version 0.20.99 [Linux: i386]
Compiled at 2019-07-10
Copyright (c) 2006-2019 by Andreas Rumpf

git hash: c94647aecad6ed7fd12152800437a6cda11e06e6
active boot switches: -d:release

Araq added a commit that referenced this issue Jul 12, 2019

@Araq Araq closed this in de1ede7 Jul 13, 2019

narimiran added a commit that referenced this issue Jul 15, 2019

fixes #11715 (#11721)
(cherry picked from commit de1ede7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.