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

findnext(A, start) and findnext(testf::Function, A, start) behave differently #36963

Closed
goretkin opened this issue Aug 7, 2020 · 4 comments
Closed

Comments

@goretkin
Copy link
Contributor

goretkin commented Aug 7, 2020

e.g.

using InfiniteArrays

# works
findfirst(>(5), 1:InfiniteArrays.Infinity())

# does not
findfirst(1:InfiniteArrays.Infinity() .> 5)

Divergence at #35965

@dlfivefifty
Copy link
Contributor

Just needs

i = oftype(l, start)

To become

i = oftype(first(keys(A)), start)

Shall I make a PR?

@nalimilan
Copy link
Member

nalimilan commented Aug 8, 2020

Probably better convert to eltype(keys(A)) instead, to avoid special-casing the first index.

@goretkin
Copy link
Contributor Author

goretkin commented Aug 8, 2020

@dlfivefifty I would prefer to get #36965 in as a solution. And then we could follow @nalimilan's suggestion, and we'll only have to fix it in half as many places.

@vtjnash
Copy link
Member

vtjnash commented Nov 12, 2021

Addressed by #36965, IIUC

@vtjnash vtjnash closed this as completed Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants