JVM_IR KT-43109 generate internal bridge for custom internal 'toArray'

Also add some tests for internal collection stubs.
This commit is contained in:
Dmitry Petrov
2020-12-04 11:18:22 +03:00
parent 149bcc2d22
commit 3dbe02b7fe
20 changed files with 266 additions and 15 deletions
@@ -15,7 +15,8 @@ public final class InternalToArray {
public method removeAll(p0: java.util.Collection): boolean
public method retainAll(p0: java.util.Collection): boolean
public bridge final method size(): int
public final @org.jetbrains.annotations.NotNull method toArray(): java.lang.Integer[]
public final @org.jetbrains.annotations.NotNull method toArray$test_module(): java.lang.Integer[]
public final method toArray(): java.lang.Object[]
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
}
@@ -0,0 +1,3 @@
class InternalGenericToArray<T>(d: Collection<T>): Collection<T> by d {
internal fun <T> toArray(arr: Array<T>): Array<T> = null!!
}
@@ -0,0 +1,20 @@
@kotlin.Metadata
public final class InternalGenericToArray {
// source: 'internalGenericToArray.kt'
private synthetic final field $$delegate_0: java.util.Collection
public method <init>(@org.jetbrains.annotations.NotNull p0: java.util.Collection): void
public method add(p0: java.lang.Object): boolean
public method addAll(p0: java.util.Collection): boolean
public method clear(): void
public method contains(p0: java.lang.Object): boolean
public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
public method getSize(): int
public method isEmpty(): boolean
public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator
public method remove(p0: java.lang.Object): boolean
public method removeAll(p0: java.util.Collection): boolean
public method retainAll(p0: java.util.Collection): boolean
public bridge final method size(): int
public final @org.jetbrains.annotations.NotNull method toArray$test_module(@org.jetbrains.annotations.NotNull p0: java.lang.Object[]): java.lang.Object[]
public method toArray(): java.lang.Object[]
}
@@ -0,0 +1,21 @@
@kotlin.Metadata
public final class InternalGenericToArray {
// source: 'internalGenericToArray.kt'
private synthetic final field $$delegate_0: java.util.Collection
public method <init>(@org.jetbrains.annotations.NotNull p0: java.util.Collection): void
public method add(p0: java.lang.Object): boolean
public method addAll(p0: java.util.Collection): boolean
public method clear(): void
public method contains(p0: java.lang.Object): boolean
public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
public method getSize(): int
public method isEmpty(): boolean
public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator
public method remove(p0: java.lang.Object): boolean
public method removeAll(p0: java.util.Collection): boolean
public method retainAll(p0: java.util.Collection): boolean
public bridge final method size(): int
public final @org.jetbrains.annotations.NotNull method toArray$test_module(@org.jetbrains.annotations.NotNull p0: java.lang.Object[]): java.lang.Object[]
public method toArray(): java.lang.Object[]
public final method toArray(p0: java.lang.Object[]): java.lang.Object[]
}