1.1.4: State is not public in kotlin.collections; cannot be accessed from outside package


#1

After updating kotlin to 1.1.4, I started experiencing the following issue. I have a lot of classes like this:

class A: GeneralComponent {

data class State(
val visible: Boolean = false,
val value: String = “”
)

}

As you see, GeneralComponent is generic of internally defined State. However, I started getting the following compile error:

State is not public in kotlin.collections; cannot be accessed from outside package

So compiler mistakenly refers to kotlin.collection.State, which is an internal kotlin private enum class, instead of my own State inside.
This issue is only reproducible on CI. When I set kotlin.incremental=false, it’s gone, which is kind of weird since we do clean anyway.

Any comments on that? Is it bug, or is it somehow expected behaviour?


#2

Solved with 1.1.4-3.