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

view(::Memory, ::UnitRange{UInt}) is broken #53990

Closed
LilithHafner opened this issue Apr 8, 2024 · 0 comments · Fixed by #53991
Closed

view(::Memory, ::UnitRange{UInt}) is broken #53990

LilithHafner opened this issue Apr 8, 2024 · 0 comments · Fixed by #53991
Assignees
Labels
bug Indicates an unexpected problem or unintended behavior
Milestone

Comments

@LilithHafner
Copy link
Member

Reported by @odow in #53896 (comment). This is because length(::UnitRange{UInt}) isa Int does not hold.

Introduced in #53896.

@LilithHafner LilithHafner added the bug Indicates an unexpected problem or unintended behavior label Apr 8, 2024
@LilithHafner LilithHafner added this to the 1.11 milestone Apr 8, 2024
@LilithHafner LilithHafner self-assigned this Apr 8, 2024
@jishnub jishnub closed this as completed in e4f2124 Apr 8, 2024
KristofferC pushed a commit that referenced this issue Apr 9, 2024
… Base.OneTo})` (#53991)

We assumed, falsely, that `length(inds) isa Int`. The length must be
convertible to an `Int` or we throw, but that conversion may need to be
explicitly performed.

Fixes #53990

CC @oscardssmith @vtjnash @odow

(cherry picked from commit e4f2124)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant