Enable kotlin.collections support for UL classes

Removed restriction for classes derived from Kotlin collections
Added type erasure for java collection overrided methods
This commit is contained in:
Igor Yakovlev
2019-09-13 17:30:16 +03:00
parent 286702a99c
commit fc70fd05fc
7 changed files with 130 additions and 129 deletions
@@ -1,21 +1,17 @@
import java.util.*
/** should load cls */
class MyList : List<String> {
override operator fun get(index: Int): String {}
}
/** should load cls */
interface ASet<T> : MutableCollection<T> {}
/** should load cls */
abstract class MySet<T> : ASet<T> {
override fun remove(elem: String): Boolean {}
}
/** should load cls */
abstract class SmartSet<T> private constructor() : AbstractSet<T>() {
abstract class SmartSet<T> private constructor() : AbstractMutableSet<T>() {
override fun iterator(): MutableIterator<T> = unresolved
override fun add(element: T): Boolean {
@@ -23,5 +19,4 @@ abstract class SmartSet<T> private constructor() : AbstractSet<T>() {
}
override fun contains(element: T): Boolean = true
}
}