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

getindex punning #163

Open
nsajko opened this issue Dec 24, 2024 · 0 comments
Open

getindex punning #163

nsajko opened this issue Dec 24, 2024 · 0 comments

Comments

@nsajko
Copy link

nsajko commented Dec 24, 2024

This package defines a getindex method that conflicts with the getindex documentation:

Base.getindex(::Type{Index}, i) = Index(i)

The relevant doc string implies that getindex(type, args...) should return an AbstractVector{type} with args as its elements.

The context here is that I'm working on a PR to Julia to make eltype more precise for some subtypes of Generator, involving things like Iterators.map(Base.Fix1(getindex, Int), [3, 7]). Thus I'm looking for packages with conflicting assumptions using JuliaHub's code search, to avoid unexpectedly breaking the ecosystem.

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

1 participant