Closed BurntSushi closed 10 years ago
@BurntSushi this is due to a change in method lookup which causes the method reachable in the fewest derefs to be used. You just need to change to (**self).next()
to ensure you are calling the method on the underlying iterator.
@reem Do'h. I tried (*self).next()
too. **self
works great. Sorry for the noise!
@BurntSushi I was hit by the exact same issue a week ago, no worries!
This code used to work (I'm not sure when it stopped working, but it was in the last few weeks I think):
When I compile and run that, I get:
valgrind
shows that it's getting stuck in an infinite loop insidenext
:So did something change that affects the resolution of
self.next()
?FYI,
quickcheck
uses this trick to define anArbitrary
trait. Maybe there's another way?