Skip to content

Instantly share code, notes, and snippets.

@mukel
Created April 5, 2016 05:34
Show Gist options
  • Save mukel/421d7b68162ca0ed0291c71b985aaeb2 to your computer and use it in GitHub Desktop.
Save mukel/421d7b68162ca0ed0291c71b985aaeb2 to your computer and use it in GitHub Desktop.
IntRRBVector(0 until /*32^5*/33554432 : _*).foreach(_ => ()) // OK
IntRRBVector(0 until /*32^5 + 1*/33554433 : _*).foreach(_ => ()) // ClassCastException
IntRRBVector(0 until /*32^5 + 1*/33554433 : _*).apply(1024) // NPE
// https://github.com/nicolasstucki/scala-rrb-vector
RRBVector.fill(/*32^5*/33554432)(0).foreach(_ => ()) // OK
RRBVector.fill(/*32^5 + 1*/ 33554433)(0).apply(1024) // NPE
RRBVector.fill(/*32^5 + 1*/33554433)(0).foreach(_ => ()) // ClassCastException
@DarkDimius
Copy link

Nice catch. I've forwarded it to Nicolas.

@nicolasstucki
Copy link

Thanks for finding this bug. nicolasstucki/scala-rrb-vector#4

@nicolasstucki
Copy link

I found and fixed the issue on the RRB Vector master. If you need it, here is the commit:
nicolasstucki/scala-rrb-vector@a31c8b4

Thanks for finding this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment