Add temporary hack for wildcards in Collections
By default we would render 'MutableCollection<String>.addAll(Collection<String>)' as '(LCollection<String>;)' (without wildcard) because String is final and effectively it's the same as '(LCollection<? extends String>;)'. But that's wrong signature in a sense that java.util.Collection has different signature: '(LCollection<? extends E>)'. Actually the problem is much wider than collections, it concerns any Java code that uses Kotlin classes with covariant parameters without '? extends E' wildcards. Temporary solution is just to hardcode/enumerate builtin methods with special signature.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
open class KList : MutableList<String> {
|
||||
abstract class KList : MutableList<String> {
|
||||
override val size: Int
|
||||
get() = throw UnsupportedOperationException()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user