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

Bug in PersistentList - list is broken after removeAll call #92

Closed
maio opened this issue Oct 30, 2020 · 1 comment
Closed

Bug in PersistentList - list is broken after removeAll call #92

maio opened this issue Oct 30, 2020 · 1 comment
Assignees
Labels

Comments

@maio
Copy link

maio commented Oct 30, 2020

It only happens in certain situations. It can be reproduced using following test:

class PersistentListTest {
    @Test
    fun `persistent list fails`() {
        var xs = persistentListOf(
            *(1..1885).map { it }.toTypedArray()
        )

        xs = xs.removeAll(
            (1..1837).map { it }
        )

        println(xs.size)

        xs.forEach {
            print(it)
        }
    }
}

print(it.i) fails with exception

java.lang.ClassCastException: class [Ljava.lang.Object; cannot be cast to class java.lang.Number
 ([Ljava.lang.Object; and java.lang.Number are in module java.base of loader 'bootstrap')
@qurbonzoda
Copy link
Contributor

Fixing commit is now in master and will part of the coming release.
Thank you for your bug report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants