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

Array(Bool)#[](start, count) always returns an array with all elements false #8272

Closed
nickpwhite opened this issue Oct 4, 2019 · 0 comments · Fixed by #8273
Closed

Array(Bool)#[](start, count) always returns an array with all elements false #8272

nickpwhite opened this issue Oct 4, 2019 · 0 comments · Fixed by #8273

Comments

@nickpwhite
Copy link

Overview

When calling the [](start, count) on an array of Bool values, the resulting array always contains only false.

The same issue occurs using other variants of the #[] method that return sub-arrays (#[](range) and #[]? methods).

I think this line is breaking. It's (eventually) called from here

Code Example

[true, false, true, true][0, 2] #=> [false, false]

Version

$ crystal -v
Crystal 0.31.1 [0e2e1d067] (2019-09-30)

LLVM: 8.0.0
Default target: x86_64-unknown-linux-gnu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants