mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
Otherwise an assertion is failing in the algorithm which is related to an inconsistency of java.lang.Object inheritance in JDR (KT-4890)
12 lines
166 B
Kotlin
12 lines
166 B
Kotlin
import java.util.HashSet
|
|
|
|
trait A : Set<String>
|
|
|
|
class B : A, HashSet<String>()
|
|
|
|
fun box(): String {
|
|
val b = B()
|
|
b.add("OK")
|
|
return b.iterator().next()
|
|
}
|