Files
kotlin-fork/core/util.runtime
Roman Golyshev 648330da50 [kotlin] Make SmartSet implement MutableSet for more type-safety
`AbstractSet` is a java class, and it brings flexible types with it.
Because of it, it was possible to write the following code:

```kt
fun usage() {
  val mySet = SmartSet.create<String>() // should not contain nulls
  mySet += null // compiles because of flexible types
}
```

Using `AbstractMutableSet`
as a base class does not change the implementation,
but explicitly adds a proper kotlin `MutableSet`
interface to the class, making it more type-safe
2023-10-16 16:25:17 +00:00
..