Fix Err fallout for graph/iterator.And iterator

This commit is contained in:
Andrew Dunham 2015-04-14 17:07:25 -07:00
parent c156fd6b1b
commit 742277e72e
2 changed files with 25 additions and 1 deletions

View file

@ -29,6 +29,7 @@ type And struct {
primaryIt graph.Iterator
checkList []graph.Iterator
result graph.Value
err error
runstats graph.IteratorStats
}
@ -153,9 +154,16 @@ func (it *And) Next() bool {
return graph.NextLogOut(it, curr, true)
}
}
if err := graph.Err(it.primaryIt); err != nil {
it.err = err
}
return graph.NextLogOut(it, nil, false)
}
func (it *And) Err() error {
return it.err
}
func (it *And) Result() graph.Value {
return it.result
}