diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation.kt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation.kt index 78ef49ecd66..20a78f0193d 100644 --- a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation.kt +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation.kt @@ -1,4 +1,19 @@ -class SimplePlatform +class DGenericIterator(d: Iterator) : Iterator by d -open class TargetPlatform(val componentPlatforms: Set) : - Collection by componentPlatforms \ No newline at end of file +class DGenericListIterator(d: ListIterator) : ListIterator by d + +class DGenericIterable(d: Iterable) : Iterable by d + +class DGenericCollection(d: Collection) : Collection by d + +class DGenericSet(d: Set) : Set by d + +class DGenericList(d: List) : List by d + +class DGenericMap(d: Map) : Map by d + +class DGenericMapEntry(d: Map.Entry) : Map.Entry by d + +class DGenericCollectionBySet(d: Set) : Collection by d + +class DGenericCollectionByList(d: List) : Collection by d \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation.txt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation.txt index aa7eca5ca01..575e6efce34 100644 --- a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation.txt +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation.txt @@ -1,22 +1,174 @@ @kotlin.Metadata -public final class SimplePlatform { +public final class DGenericCollection { // source: 'collectionByDelegation.kt' - public method (): void -} - -@kotlin.Metadata -public class TargetPlatform { - // source: 'collectionByDelegation.kt' - private final @org.jetbrains.annotations.NotNull field componentPlatforms: java.util.Set - public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): void - public method add(p0: SimplePlatform): boolean - public synthetic method add(p0: java.lang.Object): boolean + private synthetic final field $$delegate_0: java.util.Collection + public method (@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(@org.jetbrains.annotations.NotNull p0: SimplePlatform): boolean - public bridge final method contains(p0: java.lang.Object): boolean + 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DGenericCollectionByList { + // source: 'collectionByDelegation.kt' + private synthetic final field $$delegate_0: java.util.List + public method (@org.jetbrains.annotations.NotNull p0: java.util.List): 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DGenericCollectionBySet { + // source: 'collectionByDelegation.kt' + private synthetic final field $$delegate_0: java.util.Set + public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DGenericIterable { + // source: 'collectionByDelegation.kt' + private synthetic final field $$delegate_0: java.lang.Iterable + public method (@org.jetbrains.annotations.NotNull p0: java.lang.Iterable): void + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator +} + +@kotlin.Metadata +public final class DGenericIterator { + // source: 'collectionByDelegation.kt' + private synthetic final field $$delegate_0: java.util.Iterator + public method (@org.jetbrains.annotations.NotNull p0: java.util.Iterator): void + public method hasNext(): boolean + public method next(): java.lang.Object + public method remove(): void +} + +@kotlin.Metadata +public final class DGenericList { + // source: 'collectionByDelegation.kt' + private synthetic final field $$delegate_0: java.util.List + public method (@org.jetbrains.annotations.NotNull p0: java.util.List): void + public method add(p0: int, p1: java.lang.Object): void + public method add(p0: java.lang.Object): boolean + public method addAll(p0: int, p1: java.util.Collection): 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 get(p0: int): java.lang.Object + public method getSize(): int + public method indexOf(p0: java.lang.Object): int + public method isEmpty(): boolean + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator + public method lastIndexOf(p0: java.lang.Object): int + public @org.jetbrains.annotations.NotNull method listIterator(): java.util.ListIterator + public @org.jetbrains.annotations.NotNull method listIterator(p0: int): java.util.ListIterator + public method remove(p0: int): java.lang.Object + 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 method set(p0: int, p1: java.lang.Object): java.lang.Object + public bridge final method size(): int + public @org.jetbrains.annotations.NotNull method subList(p0: int, p1: int): java.util.List + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DGenericListIterator { + // source: 'collectionByDelegation.kt' + private synthetic final field $$delegate_0: java.util.ListIterator + public method (@org.jetbrains.annotations.NotNull p0: java.util.ListIterator): void + public method add(p0: java.lang.Object): void + public method hasNext(): boolean + public method hasPrevious(): boolean + public method next(): java.lang.Object + public method nextIndex(): int + public method previous(): java.lang.Object + public method previousIndex(): int + public method remove(): void + public method set(p0: java.lang.Object): void +} + +@kotlin.Metadata +public final class DGenericMap { + // source: 'collectionByDelegation.kt' + private synthetic final field $$delegate_0: java.util.Map + public method (@org.jetbrains.annotations.NotNull p0: java.util.Map): void + public method clear(): void + public method containsKey(p0: java.lang.Object): boolean + public method containsValue(p0: java.lang.Object): boolean + public bridge final method entrySet(): java.util.Set + public @org.jetbrains.annotations.Nullable method get(p0: java.lang.Object): java.lang.Object + public @org.jetbrains.annotations.NotNull method getEntries(): java.util.Set + public @org.jetbrains.annotations.NotNull method getKeys(): java.util.Set + public method getSize(): int + public @org.jetbrains.annotations.NotNull method getValues(): java.util.Collection + public method isEmpty(): boolean + public bridge final method keySet(): java.util.Set + public method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public method putAll(p0: java.util.Map): void + public method remove(p0: java.lang.Object): java.lang.Object + public bridge final method size(): int + public bridge final method values(): java.util.Collection +} + +@kotlin.Metadata +public final class DGenericMapEntry { + // source: 'collectionByDelegation.kt' + private synthetic final field $$delegate_0: java.util.Map$Entry + public method (@org.jetbrains.annotations.NotNull p0: java.util.Map$Entry): void + public method getKey(): java.lang.Object + public method getValue(): java.lang.Object + public method setValue(p0: java.lang.Object): java.lang.Object +} + +@kotlin.Metadata +public final class DGenericSet { + // source: 'collectionByDelegation.kt' + private synthetic final field $$delegate_0: java.util.Set + public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): 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 final @org.jetbrains.annotations.NotNull method getComponentPlatforms(): java.util.Set public method getSize(): int public method isEmpty(): boolean public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2.kt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2.kt new file mode 100644 index 00000000000..8296ca8b5a7 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2.kt @@ -0,0 +1,19 @@ +class DStringIterator(d: Iterator) : Iterator by d + +class DStringListIterator(d: ListIterator) : ListIterator by d + +class DStringIterable(d: Iterable) : Iterable by d + +class DStringCollection(d: Collection) : Collection by d + +class DStringSet(d: Set) : Set by d + +class DStringList(d: List) : List by d + +class DStringMap(d: Map) : Map by d + +class DStringMapEntry(d: Map.Entry) : Map.Entry by d + +class DStringCollectionBySet(d: Set) : Collection by d + +class DStringCollectionByList(d: List) : Collection by d \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2.txt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2.txt new file mode 100644 index 00000000000..be64d96b0a1 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2.txt @@ -0,0 +1,209 @@ +@kotlin.Metadata +public final class DStringCollection { + // source: 'collectionByDelegation2.kt' + private synthetic final field $$delegate_0: java.util.Collection + public method (@org.jetbrains.annotations.NotNull p0: java.util.Collection): void + public synthetic method add(p0: java.lang.Object): boolean + public method add(p0: java.lang.String): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public bridge final 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DStringCollectionByList { + // source: 'collectionByDelegation2.kt' + private synthetic final field $$delegate_0: java.util.List + public method (@org.jetbrains.annotations.NotNull p0: java.util.List): void + public synthetic method add(p0: java.lang.Object): boolean + public method add(p0: java.lang.String): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public bridge final 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DStringCollectionBySet { + // source: 'collectionByDelegation2.kt' + private synthetic final field $$delegate_0: java.util.Set + public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): void + public synthetic method add(p0: java.lang.Object): boolean + public method add(p0: java.lang.String): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public bridge final 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DStringIterable { + // source: 'collectionByDelegation2.kt' + private synthetic final field $$delegate_0: java.lang.Iterable + public method (@org.jetbrains.annotations.NotNull p0: java.lang.Iterable): void + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator +} + +@kotlin.Metadata +public final class DStringIterator { + // source: 'collectionByDelegation2.kt' + private synthetic final field $$delegate_0: java.util.Iterator + public method (@org.jetbrains.annotations.NotNull p0: java.util.Iterator): void + public method hasNext(): boolean + public synthetic bridge method next(): java.lang.Object + public @org.jetbrains.annotations.NotNull method next(): java.lang.String + public method remove(): void +} + +@kotlin.Metadata +public final class DStringList { + // source: 'collectionByDelegation2.kt' + private synthetic final field $$delegate_0: java.util.List + public method (@org.jetbrains.annotations.NotNull p0: java.util.List): void + public synthetic method add(p0: int, p1: java.lang.Object): void + public method add(p0: int, p1: java.lang.String): void + public synthetic method add(p0: java.lang.Object): boolean + public method add(p0: java.lang.String): boolean + public method addAll(p0: int, p1: java.util.Collection): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public bridge final method contains(p0: java.lang.Object): boolean + public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean + public synthetic bridge method get(p0: int): java.lang.Object + public @org.jetbrains.annotations.NotNull method get(p0: int): java.lang.String + public method getSize(): int + public method indexOf(@org.jetbrains.annotations.NotNull p0: java.lang.String): int + public bridge final method indexOf(p0: java.lang.Object): int + public method isEmpty(): boolean + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator + public method lastIndexOf(@org.jetbrains.annotations.NotNull p0: java.lang.String): int + public bridge final method lastIndexOf(p0: java.lang.Object): int + public @org.jetbrains.annotations.NotNull method listIterator(): java.util.ListIterator + public @org.jetbrains.annotations.NotNull method listIterator(p0: int): java.util.ListIterator + public synthetic method remove(p0: int): java.lang.Object + public method remove(p0: int): java.lang.String + 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 synthetic method set(p0: int, p1: java.lang.Object): java.lang.Object + public method set(p0: int, p1: java.lang.String): java.lang.String + public bridge final method size(): int + public @org.jetbrains.annotations.NotNull method subList(p0: int, p1: int): java.util.List + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DStringListIterator { + // source: 'collectionByDelegation2.kt' + private synthetic final field $$delegate_0: java.util.ListIterator + public method (@org.jetbrains.annotations.NotNull p0: java.util.ListIterator): void + public synthetic method add(p0: java.lang.Object): void + public method add(p0: java.lang.String): void + public method hasNext(): boolean + public method hasPrevious(): boolean + public synthetic bridge method next(): java.lang.Object + public @org.jetbrains.annotations.NotNull method next(): java.lang.String + public method nextIndex(): int + public synthetic bridge method previous(): java.lang.Object + public @org.jetbrains.annotations.NotNull method previous(): java.lang.String + public method previousIndex(): int + public method remove(): void + public synthetic method set(p0: java.lang.Object): void + public method set(p0: java.lang.String): void +} + +@kotlin.Metadata +public final class DStringMap { + // source: 'collectionByDelegation2.kt' + private synthetic final field $$delegate_0: java.util.Map + public method (@org.jetbrains.annotations.NotNull p0: java.util.Map): void + public method clear(): void + public method containsKey(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public bridge final method containsKey(p0: java.lang.Object): boolean + public method containsValue(@org.jetbrains.annotations.NotNull p0: java.lang.Number): boolean + public bridge final method containsValue(p0: java.lang.Object): boolean + public bridge final method entrySet(): java.util.Set + public @org.jetbrains.annotations.Nullable method get(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.Number + public bridge final method get(p0: java.lang.Object): java.lang.Object + public @org.jetbrains.annotations.NotNull method getEntries(): java.util.Set + public @org.jetbrains.annotations.NotNull method getKeys(): java.util.Set + public method getSize(): int + public @org.jetbrains.annotations.NotNull method getValues(): java.util.Collection + public method isEmpty(): boolean + public bridge final method keySet(): java.util.Set + public synthetic method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public method put(p0: java.lang.String, p1: java.lang.Number): java.lang.Number + public method putAll(p0: java.util.Map): void + public method remove(p0: java.lang.Object): java.lang.Object + public bridge final method size(): int + public bridge final method values(): java.util.Collection +} + +@kotlin.Metadata +public final class DStringMapEntry { + // source: 'collectionByDelegation2.kt' + private synthetic final field $$delegate_0: java.util.Map$Entry + public method (@org.jetbrains.annotations.NotNull p0: java.util.Map$Entry): void + public synthetic bridge method getKey(): java.lang.Object + public @org.jetbrains.annotations.NotNull method getKey(): java.lang.String + public @org.jetbrains.annotations.NotNull method getValue(): java.lang.Number + public synthetic bridge method getValue(): java.lang.Object + public method setValue(p0: java.lang.Number): java.lang.Number + public synthetic method setValue(p0: java.lang.Object): java.lang.Object +} + +@kotlin.Metadata +public final class DStringSet { + // source: 'collectionByDelegation2.kt' + private synthetic final field $$delegate_0: java.util.Set + public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): void + public synthetic method add(p0: java.lang.Object): boolean + public method add(p0: java.lang.String): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public bridge final 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2WithFullJdk.kt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2WithFullJdk.kt new file mode 100644 index 00000000000..189d17dc937 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2WithFullJdk.kt @@ -0,0 +1,20 @@ +// FULL_JDK +class DStringIterator(d: Iterator) : Iterator by d + +class DStringListIterator(d: ListIterator) : ListIterator by d + +class DStringIterable(d: Iterable) : Iterable by d + +class DStringCollection(d: Collection) : Collection by d + +class DStringSet(d: Set) : Set by d + +class DStringList(d: List) : List by d + +class DStringMap(d: Map) : Map by d + +class DStringMapEntry(d: Map.Entry) : Map.Entry by d + +class DStringCollectionBySet(d: Set) : Collection by d + +class DStringCollectionByList(d: List) : Collection by d \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2WithFullJdk.txt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2WithFullJdk.txt new file mode 100644 index 00000000000..349032f9bdf --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2WithFullJdk.txt @@ -0,0 +1,230 @@ +@kotlin.Metadata +public final class DStringCollection { + // source: 'collectionByDelegation2WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Collection + public method (@org.jetbrains.annotations.NotNull p0: java.util.Collection): void + public synthetic method add(p0: java.lang.Object): boolean + public method add(p0: java.lang.String): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public bridge final 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 removeIf(p0: java.util.function.Predicate): boolean + public method retainAll(p0: java.util.Collection): boolean + public bridge final method size(): int + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DStringCollectionByList { + // source: 'collectionByDelegation2WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.List + public method (@org.jetbrains.annotations.NotNull p0: java.util.List): void + public synthetic method add(p0: java.lang.Object): boolean + public method add(p0: java.lang.String): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public bridge final 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 removeIf(p0: java.util.function.Predicate): boolean + public method retainAll(p0: java.util.Collection): boolean + public bridge final method size(): int + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DStringCollectionBySet { + // source: 'collectionByDelegation2WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Set + public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): void + public synthetic method add(p0: java.lang.Object): boolean + public method add(p0: java.lang.String): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public bridge final 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 removeIf(p0: java.util.function.Predicate): boolean + public method retainAll(p0: java.util.Collection): boolean + public bridge final method size(): int + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DStringIterable { + // source: 'collectionByDelegation2WithFullJdk.kt' + private synthetic final field $$delegate_0: java.lang.Iterable + public method (@org.jetbrains.annotations.NotNull p0: java.lang.Iterable): void + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator +} + +@kotlin.Metadata +public final class DStringIterator { + // source: 'collectionByDelegation2WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Iterator + public method (@org.jetbrains.annotations.NotNull p0: java.util.Iterator): void + public method hasNext(): boolean + public synthetic bridge method next(): java.lang.Object + public @org.jetbrains.annotations.NotNull method next(): java.lang.String + public method remove(): void +} + +@kotlin.Metadata +public final class DStringList { + // source: 'collectionByDelegation2WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.List + public method (@org.jetbrains.annotations.NotNull p0: java.util.List): void + public synthetic method add(p0: int, p1: java.lang.Object): void + public method add(p0: int, p1: java.lang.String): void + public synthetic method add(p0: java.lang.Object): boolean + public method add(p0: java.lang.String): boolean + public method addAll(p0: int, p1: java.util.Collection): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public bridge final method contains(p0: java.lang.Object): boolean + public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean + public synthetic bridge method get(p0: int): java.lang.Object + public @org.jetbrains.annotations.NotNull method get(p0: int): java.lang.String + public method getSize(): int + public method indexOf(@org.jetbrains.annotations.NotNull p0: java.lang.String): int + public bridge final method indexOf(p0: java.lang.Object): int + public method isEmpty(): boolean + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator + public method lastIndexOf(@org.jetbrains.annotations.NotNull p0: java.lang.String): int + public bridge final method lastIndexOf(p0: java.lang.Object): int + public @org.jetbrains.annotations.NotNull method listIterator(): java.util.ListIterator + public @org.jetbrains.annotations.NotNull method listIterator(p0: int): java.util.ListIterator + public synthetic method remove(p0: int): java.lang.Object + public method remove(p0: int): java.lang.String + public method remove(p0: java.lang.Object): boolean + public method removeAll(p0: java.util.Collection): boolean + public method replaceAll(p0: java.util.function.UnaryOperator): void + public method retainAll(p0: java.util.Collection): boolean + public synthetic method set(p0: int, p1: java.lang.Object): java.lang.Object + public method set(p0: int, p1: java.lang.String): java.lang.String + public bridge final method size(): int + public method sort(p0: java.util.Comparator): void + public @org.jetbrains.annotations.NotNull method subList(p0: int, p1: int): java.util.List + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DStringListIterator { + // source: 'collectionByDelegation2WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.ListIterator + public method (@org.jetbrains.annotations.NotNull p0: java.util.ListIterator): void + public synthetic method add(p0: java.lang.Object): void + public method add(p0: java.lang.String): void + public method hasNext(): boolean + public method hasPrevious(): boolean + public synthetic bridge method next(): java.lang.Object + public @org.jetbrains.annotations.NotNull method next(): java.lang.String + public method nextIndex(): int + public synthetic bridge method previous(): java.lang.Object + public @org.jetbrains.annotations.NotNull method previous(): java.lang.String + public method previousIndex(): int + public method remove(): void + public synthetic method set(p0: java.lang.Object): void + public method set(p0: java.lang.String): void +} + +@kotlin.Metadata +public final class DStringMap { + // source: 'collectionByDelegation2WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Map + public method (@org.jetbrains.annotations.NotNull p0: java.util.Map): void + public method clear(): void + public synthetic method compute(p0: java.lang.Object, p1: java.util.function.BiFunction): java.lang.Object + public method compute(p0: java.lang.String, p1: java.util.function.BiFunction): java.lang.Number + public synthetic method computeIfAbsent(p0: java.lang.Object, p1: java.util.function.Function): java.lang.Object + public method computeIfAbsent(p0: java.lang.String, p1: java.util.function.Function): java.lang.Number + public synthetic method computeIfPresent(p0: java.lang.Object, p1: java.util.function.BiFunction): java.lang.Object + public method computeIfPresent(p0: java.lang.String, p1: java.util.function.BiFunction): java.lang.Number + public method containsKey(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public bridge final method containsKey(p0: java.lang.Object): boolean + public method containsValue(@org.jetbrains.annotations.NotNull p0: java.lang.Number): boolean + public bridge final method containsValue(p0: java.lang.Object): boolean + public bridge final method entrySet(): java.util.Set + public @org.jetbrains.annotations.Nullable method get(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.Number + public bridge final method get(p0: java.lang.Object): java.lang.Object + public @org.jetbrains.annotations.NotNull method getEntries(): java.util.Set + public @org.jetbrains.annotations.NotNull method getKeys(): java.util.Set + public method getSize(): int + public @org.jetbrains.annotations.NotNull method getValues(): java.util.Collection + public method isEmpty(): boolean + public bridge final method keySet(): java.util.Set + public synthetic method merge(p0: java.lang.Object, p1: java.lang.Object, p2: java.util.function.BiFunction): java.lang.Object + public method merge(p0: java.lang.String, p1: java.lang.Number, p2: java.util.function.BiFunction): java.lang.Number + public synthetic method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public method put(p0: java.lang.String, p1: java.lang.Number): java.lang.Number + public method putAll(p0: java.util.Map): void + public synthetic method putIfAbsent(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public method putIfAbsent(p0: java.lang.String, p1: java.lang.Number): java.lang.Number + public method remove(p0: java.lang.Object): java.lang.Object + public method remove(p0: java.lang.Object, p1: java.lang.Object): boolean + public synthetic method replace(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public synthetic method replace(p0: java.lang.Object, p1: java.lang.Object, p2: java.lang.Object): boolean + public method replace(p0: java.lang.String, p1: java.lang.Number): java.lang.Number + public method replace(p0: java.lang.String, p1: java.lang.Number, p2: java.lang.Number): boolean + public method replaceAll(p0: java.util.function.BiFunction): void + public bridge final method size(): int + public bridge final method values(): java.util.Collection +} + +@kotlin.Metadata +public final class DStringMapEntry { + // source: 'collectionByDelegation2WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Map$Entry + public method (@org.jetbrains.annotations.NotNull p0: java.util.Map$Entry): void + public synthetic bridge method getKey(): java.lang.Object + public @org.jetbrains.annotations.NotNull method getKey(): java.lang.String + public @org.jetbrains.annotations.NotNull method getValue(): java.lang.Number + public synthetic bridge method getValue(): java.lang.Object + public method setValue(p0: java.lang.Number): java.lang.Number + public synthetic method setValue(p0: java.lang.Object): java.lang.Object +} + +@kotlin.Metadata +public final class DStringSet { + // source: 'collectionByDelegation2WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Set + public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): void + public synthetic method add(p0: java.lang.Object): boolean + public method add(p0: java.lang.String): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public bridge final 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2WithFullJdk_ir.txt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2WithFullJdk_ir.txt new file mode 100644 index 00000000000..0c5d1000b3b --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2WithFullJdk_ir.txt @@ -0,0 +1,232 @@ +@kotlin.Metadata +public final class DStringCollection { + // source: 'collectionByDelegation2WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Collection + public method (@org.jetbrains.annotations.NotNull p0: java.util.Collection): void + public synthetic bridge method add(p0: java.lang.Object): boolean + public method add(p0: java.lang.String): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public bridge final 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 removeIf(p0: java.util.function.Predicate): boolean + public method retainAll(p0: java.util.Collection): boolean + public bridge final method size(): int + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DStringCollectionByList { + // source: 'collectionByDelegation2WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.List + public method (@org.jetbrains.annotations.NotNull p0: java.util.List): void + public synthetic bridge method add(p0: java.lang.Object): boolean + public method add(p0: java.lang.String): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public bridge final 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 removeIf(p0: java.util.function.Predicate): boolean + public method retainAll(p0: java.util.Collection): boolean + public bridge final method size(): int + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DStringCollectionBySet { + // source: 'collectionByDelegation2WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Set + public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): void + public synthetic bridge method add(p0: java.lang.Object): boolean + public method add(p0: java.lang.String): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public bridge final 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 removeIf(p0: java.util.function.Predicate): boolean + public method retainAll(p0: java.util.Collection): boolean + public bridge final method size(): int + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DStringIterable { + // source: 'collectionByDelegation2WithFullJdk.kt' + private synthetic final field $$delegate_0: java.lang.Iterable + public method (@org.jetbrains.annotations.NotNull p0: java.lang.Iterable): void + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator +} + +@kotlin.Metadata +public final class DStringIterator { + // source: 'collectionByDelegation2WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Iterator + public method (@org.jetbrains.annotations.NotNull p0: java.util.Iterator): void + public method hasNext(): boolean + public synthetic bridge method next(): java.lang.Object + public @org.jetbrains.annotations.NotNull method next(): java.lang.String + public method remove(): void +} + +@kotlin.Metadata +public final class DStringList { + // source: 'collectionByDelegation2WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.List + public method (@org.jetbrains.annotations.NotNull p0: java.util.List): void + public synthetic bridge method add(p0: int, p1: java.lang.Object): void + public method add(p0: int, p1: java.lang.String): void + public synthetic bridge method add(p0: java.lang.Object): boolean + public method add(p0: java.lang.String): boolean + public method addAll(p0: int, p1: java.util.Collection): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public bridge final method contains(p0: java.lang.Object): boolean + public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean + public synthetic bridge method get(p0: int): java.lang.Object + public @org.jetbrains.annotations.NotNull method get(p0: int): java.lang.String + public method getSize(): int + public method indexOf(@org.jetbrains.annotations.NotNull p0: java.lang.String): int + public bridge final method indexOf(p0: java.lang.Object): int + public method isEmpty(): boolean + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator + public method lastIndexOf(@org.jetbrains.annotations.NotNull p0: java.lang.String): int + public bridge final method lastIndexOf(p0: java.lang.Object): int + public @org.jetbrains.annotations.NotNull method listIterator(): java.util.ListIterator + public @org.jetbrains.annotations.NotNull method listIterator(p0: int): java.util.ListIterator + public synthetic bridge method remove(p0: int): java.lang.Object + public method remove(p0: int): java.lang.String + public method remove(p0: java.lang.Object): boolean + public method removeAll(p0: java.util.Collection): boolean + public method replaceAll(p0: java.util.function.UnaryOperator): void + public method retainAll(p0: java.util.Collection): boolean + public synthetic bridge method set(p0: int, p1: java.lang.Object): java.lang.Object + public method set(p0: int, p1: java.lang.String): java.lang.String + public bridge final method size(): int + public method sort(p0: java.util.Comparator): void + public @org.jetbrains.annotations.NotNull method subList(p0: int, p1: int): java.util.List + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DStringListIterator { + // source: 'collectionByDelegation2WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.ListIterator + public method (@org.jetbrains.annotations.NotNull p0: java.util.ListIterator): void + public synthetic bridge method add(p0: java.lang.Object): void + public method add(p0: java.lang.String): void + public method hasNext(): boolean + public method hasPrevious(): boolean + public synthetic bridge method next(): java.lang.Object + public @org.jetbrains.annotations.NotNull method next(): java.lang.String + public method nextIndex(): int + public synthetic bridge method previous(): java.lang.Object + public @org.jetbrains.annotations.NotNull method previous(): java.lang.String + public method previousIndex(): int + public method remove(): void + public synthetic bridge method set(p0: java.lang.Object): void + public method set(p0: java.lang.String): void +} + +@kotlin.Metadata +public final class DStringMap { + // source: 'collectionByDelegation2WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Map + public method (@org.jetbrains.annotations.NotNull p0: java.util.Map): void + public method clear(): void + public synthetic bridge method compute(p0: java.lang.Object, p1: java.util.function.BiFunction): java.lang.Object + public method compute(p0: java.lang.String, p1: java.util.function.BiFunction): java.lang.Number + public synthetic bridge method computeIfAbsent(p0: java.lang.Object, p1: java.util.function.Function): java.lang.Object + public method computeIfAbsent(p0: java.lang.String, p1: java.util.function.Function): java.lang.Number + public synthetic bridge method computeIfPresent(p0: java.lang.Object, p1: java.util.function.BiFunction): java.lang.Object + public method computeIfPresent(p0: java.lang.String, p1: java.util.function.BiFunction): java.lang.Number + public method containsKey(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public bridge final method containsKey(p0: java.lang.Object): boolean + public method containsValue(@org.jetbrains.annotations.NotNull p0: java.lang.Number): boolean + public bridge final method containsValue(p0: java.lang.Object): boolean + public bridge final method entrySet(): java.util.Set + public @org.jetbrains.annotations.Nullable method get(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.Number + public bridge final method get(p0: java.lang.Object): java.lang.Number + public synthetic bridge method get(p0: java.lang.Object): java.lang.Object + public @org.jetbrains.annotations.NotNull method getEntries(): java.util.Set + public @org.jetbrains.annotations.NotNull method getKeys(): java.util.Set + public method getSize(): int + public @org.jetbrains.annotations.NotNull method getValues(): java.util.Collection + public method isEmpty(): boolean + public bridge final method keySet(): java.util.Set + public synthetic bridge method merge(p0: java.lang.Object, p1: java.lang.Object, p2: java.util.function.BiFunction): java.lang.Object + public method merge(p0: java.lang.String, p1: java.lang.Number, p2: java.util.function.BiFunction): java.lang.Number + public synthetic bridge method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public method put(p0: java.lang.String, p1: java.lang.Number): java.lang.Number + public method putAll(p0: java.util.Map): void + public synthetic bridge method putIfAbsent(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public method putIfAbsent(p0: java.lang.String, p1: java.lang.Number): java.lang.Number + public method remove(p0: java.lang.Object): java.lang.Number + public synthetic bridge method remove(p0: java.lang.Object): java.lang.Object + public method remove(p0: java.lang.Object, p1: java.lang.Object): boolean + public synthetic bridge method replace(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public synthetic bridge method replace(p0: java.lang.Object, p1: java.lang.Object, p2: java.lang.Object): boolean + public method replace(p0: java.lang.String, p1: java.lang.Number): java.lang.Number + public method replace(p0: java.lang.String, p1: java.lang.Number, p2: java.lang.Number): boolean + public method replaceAll(p0: java.util.function.BiFunction): void + public bridge final method size(): int + public bridge final method values(): java.util.Collection +} + +@kotlin.Metadata +public final class DStringMapEntry { + // source: 'collectionByDelegation2WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Map$Entry + public method (@org.jetbrains.annotations.NotNull p0: java.util.Map$Entry): void + public synthetic bridge method getKey(): java.lang.Object + public @org.jetbrains.annotations.NotNull method getKey(): java.lang.String + public @org.jetbrains.annotations.NotNull method getValue(): java.lang.Number + public synthetic bridge method getValue(): java.lang.Object + public method setValue(p0: java.lang.Number): java.lang.Number + public synthetic bridge method setValue(p0: java.lang.Object): java.lang.Object +} + +@kotlin.Metadata +public final class DStringSet { + // source: 'collectionByDelegation2WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Set + public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): void + public synthetic bridge method add(p0: java.lang.Object): boolean + public method add(p0: java.lang.String): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public bridge final 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2_ir.txt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2_ir.txt new file mode 100644 index 00000000000..99cb2564282 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2_ir.txt @@ -0,0 +1,211 @@ +@kotlin.Metadata +public final class DStringCollection { + // source: 'collectionByDelegation2.kt' + private synthetic final field $$delegate_0: java.util.Collection + public method (@org.jetbrains.annotations.NotNull p0: java.util.Collection): void + public synthetic bridge method add(p0: java.lang.Object): boolean + public method add(p0: java.lang.String): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public bridge final 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DStringCollectionByList { + // source: 'collectionByDelegation2.kt' + private synthetic final field $$delegate_0: java.util.List + public method (@org.jetbrains.annotations.NotNull p0: java.util.List): void + public synthetic bridge method add(p0: java.lang.Object): boolean + public method add(p0: java.lang.String): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public bridge final 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DStringCollectionBySet { + // source: 'collectionByDelegation2.kt' + private synthetic final field $$delegate_0: java.util.Set + public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): void + public synthetic bridge method add(p0: java.lang.Object): boolean + public method add(p0: java.lang.String): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public bridge final 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DStringIterable { + // source: 'collectionByDelegation2.kt' + private synthetic final field $$delegate_0: java.lang.Iterable + public method (@org.jetbrains.annotations.NotNull p0: java.lang.Iterable): void + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator +} + +@kotlin.Metadata +public final class DStringIterator { + // source: 'collectionByDelegation2.kt' + private synthetic final field $$delegate_0: java.util.Iterator + public method (@org.jetbrains.annotations.NotNull p0: java.util.Iterator): void + public method hasNext(): boolean + public synthetic bridge method next(): java.lang.Object + public @org.jetbrains.annotations.NotNull method next(): java.lang.String + public method remove(): void +} + +@kotlin.Metadata +public final class DStringList { + // source: 'collectionByDelegation2.kt' + private synthetic final field $$delegate_0: java.util.List + public method (@org.jetbrains.annotations.NotNull p0: java.util.List): void + public synthetic bridge method add(p0: int, p1: java.lang.Object): void + public method add(p0: int, p1: java.lang.String): void + public synthetic bridge method add(p0: java.lang.Object): boolean + public method add(p0: java.lang.String): boolean + public method addAll(p0: int, p1: java.util.Collection): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public bridge final method contains(p0: java.lang.Object): boolean + public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean + public synthetic bridge method get(p0: int): java.lang.Object + public @org.jetbrains.annotations.NotNull method get(p0: int): java.lang.String + public method getSize(): int + public method indexOf(@org.jetbrains.annotations.NotNull p0: java.lang.String): int + public bridge final method indexOf(p0: java.lang.Object): int + public method isEmpty(): boolean + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator + public method lastIndexOf(@org.jetbrains.annotations.NotNull p0: java.lang.String): int + public bridge final method lastIndexOf(p0: java.lang.Object): int + public @org.jetbrains.annotations.NotNull method listIterator(): java.util.ListIterator + public @org.jetbrains.annotations.NotNull method listIterator(p0: int): java.util.ListIterator + public synthetic bridge method remove(p0: int): java.lang.Object + public method remove(p0: int): java.lang.String + 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 synthetic bridge method set(p0: int, p1: java.lang.Object): java.lang.Object + public method set(p0: int, p1: java.lang.String): java.lang.String + public bridge final method size(): int + public @org.jetbrains.annotations.NotNull method subList(p0: int, p1: int): java.util.List + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DStringListIterator { + // source: 'collectionByDelegation2.kt' + private synthetic final field $$delegate_0: java.util.ListIterator + public method (@org.jetbrains.annotations.NotNull p0: java.util.ListIterator): void + public synthetic bridge method add(p0: java.lang.Object): void + public method add(p0: java.lang.String): void + public method hasNext(): boolean + public method hasPrevious(): boolean + public synthetic bridge method next(): java.lang.Object + public @org.jetbrains.annotations.NotNull method next(): java.lang.String + public method nextIndex(): int + public synthetic bridge method previous(): java.lang.Object + public @org.jetbrains.annotations.NotNull method previous(): java.lang.String + public method previousIndex(): int + public method remove(): void + public synthetic bridge method set(p0: java.lang.Object): void + public method set(p0: java.lang.String): void +} + +@kotlin.Metadata +public final class DStringMap { + // source: 'collectionByDelegation2.kt' + private synthetic final field $$delegate_0: java.util.Map + public method (@org.jetbrains.annotations.NotNull p0: java.util.Map): void + public method clear(): void + public method containsKey(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public bridge final method containsKey(p0: java.lang.Object): boolean + public method containsValue(@org.jetbrains.annotations.NotNull p0: java.lang.Number): boolean + public bridge final method containsValue(p0: java.lang.Object): boolean + public bridge final method entrySet(): java.util.Set + public @org.jetbrains.annotations.Nullable method get(@org.jetbrains.annotations.NotNull p0: java.lang.String): java.lang.Number + public bridge final method get(p0: java.lang.Object): java.lang.Number + public synthetic bridge method get(p0: java.lang.Object): java.lang.Object + public @org.jetbrains.annotations.NotNull method getEntries(): java.util.Set + public @org.jetbrains.annotations.NotNull method getKeys(): java.util.Set + public method getSize(): int + public @org.jetbrains.annotations.NotNull method getValues(): java.util.Collection + public method isEmpty(): boolean + public bridge final method keySet(): java.util.Set + public synthetic bridge method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public method put(p0: java.lang.String, p1: java.lang.Number): java.lang.Number + public method putAll(p0: java.util.Map): void + public method remove(p0: java.lang.Object): java.lang.Number + public synthetic bridge method remove(p0: java.lang.Object): java.lang.Object + public bridge final method size(): int + public bridge final method values(): java.util.Collection +} + +@kotlin.Metadata +public final class DStringMapEntry { + // source: 'collectionByDelegation2.kt' + private synthetic final field $$delegate_0: java.util.Map$Entry + public method (@org.jetbrains.annotations.NotNull p0: java.util.Map$Entry): void + public synthetic bridge method getKey(): java.lang.Object + public @org.jetbrains.annotations.NotNull method getKey(): java.lang.String + public @org.jetbrains.annotations.NotNull method getValue(): java.lang.Number + public synthetic bridge method getValue(): java.lang.Object + public method setValue(p0: java.lang.Number): java.lang.Number + public synthetic bridge method setValue(p0: java.lang.Object): java.lang.Object +} + +@kotlin.Metadata +public final class DStringSet { + // source: 'collectionByDelegation2.kt' + private synthetic final field $$delegate_0: java.util.Set + public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): void + public synthetic bridge method add(p0: java.lang.Object): boolean + public method add(p0: java.lang.String): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean + public bridge final 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3.kt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3.kt new file mode 100644 index 00000000000..c888599591c --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3.kt @@ -0,0 +1,19 @@ +class DIntIterator(d: Iterator) : Iterator by d + +class DIntListIterator(d: ListIterator) : ListIterator by d + +class DIntIterable(d: Iterable) : Iterable by d + +class DIntCollection(d: Collection) : Collection by d + +class DIntSet(d: Set) : Set by d + +class DIntList(d: List) : List by d + +class DIntMap(d: Map) : Map by d + +class DIntMapEntry(d: Map.Entry) : Map.Entry by d + +class DIntCollectionBySet(d: Set) : Collection by d + +class DIntCollectionByList(d: List) : Collection by d \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3.txt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3.txt new file mode 100644 index 00000000000..cdc1fb22b7f --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3.txt @@ -0,0 +1,209 @@ +@kotlin.Metadata +public final class DIntCollection { + // source: 'collectionByDelegation3.kt' + private synthetic final field $$delegate_0: java.util.Collection + public method (@org.jetbrains.annotations.NotNull p0: java.util.Collection): void + public method add(p0: int): boolean + public synthetic method add(p0: java.lang.Object): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(p0: int): boolean + public bridge final 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DIntCollectionByList { + // source: 'collectionByDelegation3.kt' + private synthetic final field $$delegate_0: java.util.List + public method (@org.jetbrains.annotations.NotNull p0: java.util.List): void + public method add(p0: int): boolean + public synthetic method add(p0: java.lang.Object): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(p0: int): boolean + public bridge final 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DIntCollectionBySet { + // source: 'collectionByDelegation3.kt' + private synthetic final field $$delegate_0: java.util.Set + public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): void + public method add(p0: int): boolean + public synthetic method add(p0: java.lang.Object): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(p0: int): boolean + public bridge final 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DIntIterable { + // source: 'collectionByDelegation3.kt' + private synthetic final field $$delegate_0: java.lang.Iterable + public method (@org.jetbrains.annotations.NotNull p0: java.lang.Iterable): void + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator +} + +@kotlin.Metadata +public final class DIntIterator { + // source: 'collectionByDelegation3.kt' + private synthetic final field $$delegate_0: java.util.Iterator + public method (@org.jetbrains.annotations.NotNull p0: java.util.Iterator): void + public method hasNext(): boolean + public @org.jetbrains.annotations.NotNull method next(): java.lang.Integer + public synthetic bridge method next(): java.lang.Object + public method remove(): void +} + +@kotlin.Metadata +public final class DIntList { + // source: 'collectionByDelegation3.kt' + private synthetic final field $$delegate_0: java.util.List + public method (@org.jetbrains.annotations.NotNull p0: java.util.List): void + public method add(p0: int): boolean + public method add(p0: int, p1: int): void + public synthetic method add(p0: int, p1: java.lang.Object): void + public synthetic method add(p0: java.lang.Object): boolean + public method addAll(p0: int, p1: java.util.Collection): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(p0: int): boolean + public bridge final method contains(p0: java.lang.Object): boolean + public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean + public @org.jetbrains.annotations.NotNull method get(p0: int): java.lang.Integer + public synthetic bridge method get(p0: int): java.lang.Object + public method getSize(): int + public method indexOf(p0: int): int + public bridge final method indexOf(p0: java.lang.Object): int + public method isEmpty(): boolean + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator + public method lastIndexOf(p0: int): int + public bridge final method lastIndexOf(p0: java.lang.Object): int + public @org.jetbrains.annotations.NotNull method listIterator(): java.util.ListIterator + public @org.jetbrains.annotations.NotNull method listIterator(p0: int): java.util.ListIterator + public method remove(p0: int): int + public synthetic method remove(p0: int): java.lang.Object + 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 method set(p0: int, p1: int): java.lang.Integer + public synthetic method set(p0: int, p1: java.lang.Object): java.lang.Object + public bridge final method size(): int + public @org.jetbrains.annotations.NotNull method subList(p0: int, p1: int): java.util.List + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DIntListIterator { + // source: 'collectionByDelegation3.kt' + private synthetic final field $$delegate_0: java.util.ListIterator + public method (@org.jetbrains.annotations.NotNull p0: java.util.ListIterator): void + public method add(p0: int): void + public synthetic method add(p0: java.lang.Object): void + public method hasNext(): boolean + public method hasPrevious(): boolean + public @org.jetbrains.annotations.NotNull method next(): java.lang.Integer + public synthetic bridge method next(): java.lang.Object + public method nextIndex(): int + public @org.jetbrains.annotations.NotNull method previous(): java.lang.Integer + public synthetic bridge method previous(): java.lang.Object + public method previousIndex(): int + public method remove(): void + public method set(p0: int): void + public synthetic method set(p0: java.lang.Object): void +} + +@kotlin.Metadata +public final class DIntMap { + // source: 'collectionByDelegation3.kt' + private synthetic final field $$delegate_0: java.util.Map + public method (@org.jetbrains.annotations.NotNull p0: java.util.Map): void + public method clear(): void + public method containsKey(p0: int): boolean + public bridge final method containsKey(p0: java.lang.Object): boolean + public method containsValue(p0: double): boolean + public bridge final method containsValue(p0: java.lang.Object): boolean + public bridge final method entrySet(): java.util.Set + public @org.jetbrains.annotations.Nullable method get(p0: int): java.lang.Double + public bridge final method get(p0: java.lang.Object): java.lang.Object + public @org.jetbrains.annotations.NotNull method getEntries(): java.util.Set + public @org.jetbrains.annotations.NotNull method getKeys(): java.util.Set + public method getSize(): int + public @org.jetbrains.annotations.NotNull method getValues(): java.util.Collection + public method isEmpty(): boolean + public bridge final method keySet(): java.util.Set + public method put(p0: int, p1: double): java.lang.Double + public synthetic method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public method putAll(p0: java.util.Map): void + public method remove(p0: java.lang.Object): java.lang.Object + public bridge final method size(): int + public bridge final method values(): java.util.Collection +} + +@kotlin.Metadata +public final class DIntMapEntry { + // source: 'collectionByDelegation3.kt' + private synthetic final field $$delegate_0: java.util.Map$Entry + public method (@org.jetbrains.annotations.NotNull p0: java.util.Map$Entry): void + public @org.jetbrains.annotations.NotNull method getKey(): java.lang.Integer + public synthetic bridge method getKey(): java.lang.Object + public @org.jetbrains.annotations.NotNull method getValue(): java.lang.Double + public synthetic bridge method getValue(): java.lang.Object + public method setValue(p0: double): java.lang.Double + public synthetic method setValue(p0: java.lang.Object): java.lang.Object +} + +@kotlin.Metadata +public final class DIntSet { + // source: 'collectionByDelegation3.kt' + private synthetic final field $$delegate_0: java.util.Set + public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): void + public method add(p0: int): boolean + public synthetic method add(p0: java.lang.Object): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(p0: int): boolean + public bridge final 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3WithFullJdk.kt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3WithFullJdk.kt new file mode 100644 index 00000000000..efe9a6ea960 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3WithFullJdk.kt @@ -0,0 +1,22 @@ +// FULL_JDK +// See also: https://youtrack.jetbrains.com/issue/KT-42330 + +class DIntIterator(d: Iterator) : Iterator by d + +class DIntListIterator(d: ListIterator) : ListIterator by d + +class DIntIterable(d: Iterable) : Iterable by d + +class DIntCollection(d: Collection) : Collection by d + +class DIntSet(d: Set) : Set by d + +class DIntList(d: List) : List by d + +class DIntMap(d: Map) : Map by d + +class DIntMapEntry(d: Map.Entry) : Map.Entry by d + +class DIntCollectionBySet(d: Set) : Collection by d + +class DIntCollectionByList(d: List) : Collection by d \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3WithFullJdk.txt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3WithFullJdk.txt new file mode 100644 index 00000000000..25ee061ef30 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3WithFullJdk.txt @@ -0,0 +1,230 @@ +@kotlin.Metadata +public final class DIntCollection { + // source: 'collectionByDelegation3WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Collection + public method (@org.jetbrains.annotations.NotNull p0: java.util.Collection): void + public method add(p0: int): boolean + public synthetic method add(p0: java.lang.Object): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(p0: int): boolean + public bridge final 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 removeIf(p0: java.util.function.Predicate): boolean + public method retainAll(p0: java.util.Collection): boolean + public bridge final method size(): int + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DIntCollectionByList { + // source: 'collectionByDelegation3WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.List + public method (@org.jetbrains.annotations.NotNull p0: java.util.List): void + public method add(p0: int): boolean + public synthetic method add(p0: java.lang.Object): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(p0: int): boolean + public bridge final 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 removeIf(p0: java.util.function.Predicate): boolean + public method retainAll(p0: java.util.Collection): boolean + public bridge final method size(): int + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DIntCollectionBySet { + // source: 'collectionByDelegation3WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Set + public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): void + public method add(p0: int): boolean + public synthetic method add(p0: java.lang.Object): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(p0: int): boolean + public bridge final 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 removeIf(p0: java.util.function.Predicate): boolean + public method retainAll(p0: java.util.Collection): boolean + public bridge final method size(): int + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DIntIterable { + // source: 'collectionByDelegation3WithFullJdk.kt' + private synthetic final field $$delegate_0: java.lang.Iterable + public method (@org.jetbrains.annotations.NotNull p0: java.lang.Iterable): void + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator +} + +@kotlin.Metadata +public final class DIntIterator { + // source: 'collectionByDelegation3WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Iterator + public method (@org.jetbrains.annotations.NotNull p0: java.util.Iterator): void + public method hasNext(): boolean + public @org.jetbrains.annotations.NotNull method next(): java.lang.Integer + public synthetic bridge method next(): java.lang.Object + public method remove(): void +} + +@kotlin.Metadata +public final class DIntList { + // source: 'collectionByDelegation3WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.List + public method (@org.jetbrains.annotations.NotNull p0: java.util.List): void + public method add(p0: int): boolean + public method add(p0: int, p1: int): void + public synthetic method add(p0: int, p1: java.lang.Object): void + public synthetic method add(p0: java.lang.Object): boolean + public method addAll(p0: int, p1: java.util.Collection): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(p0: int): boolean + public bridge final method contains(p0: java.lang.Object): boolean + public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean + public @org.jetbrains.annotations.NotNull method get(p0: int): java.lang.Integer + public synthetic bridge method get(p0: int): java.lang.Object + public method getSize(): int + public method indexOf(p0: int): int + public bridge final method indexOf(p0: java.lang.Object): int + public method isEmpty(): boolean + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator + public method lastIndexOf(p0: int): int + public bridge final method lastIndexOf(p0: java.lang.Object): int + public @org.jetbrains.annotations.NotNull method listIterator(): java.util.ListIterator + public @org.jetbrains.annotations.NotNull method listIterator(p0: int): java.util.ListIterator + public method remove(p0: int): int + public synthetic method remove(p0: int): java.lang.Object + public method remove(p0: java.lang.Object): boolean + public method removeAll(p0: java.util.Collection): boolean + public method replaceAll(p0: java.util.function.UnaryOperator): void + public method retainAll(p0: java.util.Collection): boolean + public method set(p0: int, p1: int): java.lang.Integer + public synthetic method set(p0: int, p1: java.lang.Object): java.lang.Object + public bridge final method size(): int + public method sort(p0: java.util.Comparator): void + public @org.jetbrains.annotations.NotNull method subList(p0: int, p1: int): java.util.List + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DIntListIterator { + // source: 'collectionByDelegation3WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.ListIterator + public method (@org.jetbrains.annotations.NotNull p0: java.util.ListIterator): void + public method add(p0: int): void + public synthetic method add(p0: java.lang.Object): void + public method hasNext(): boolean + public method hasPrevious(): boolean + public @org.jetbrains.annotations.NotNull method next(): java.lang.Integer + public synthetic bridge method next(): java.lang.Object + public method nextIndex(): int + public @org.jetbrains.annotations.NotNull method previous(): java.lang.Integer + public synthetic bridge method previous(): java.lang.Object + public method previousIndex(): int + public method remove(): void + public method set(p0: int): void + public synthetic method set(p0: java.lang.Object): void +} + +@kotlin.Metadata +public final class DIntMap { + // source: 'collectionByDelegation3WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Map + public method (@org.jetbrains.annotations.NotNull p0: java.util.Map): void + public method clear(): void + public method compute(p0: java.lang.Integer, p1: java.util.function.BiFunction): java.lang.Double + public synthetic method compute(p0: java.lang.Object, p1: java.util.function.BiFunction): java.lang.Object + public method computeIfAbsent(p0: java.lang.Integer, p1: java.util.function.Function): java.lang.Double + public synthetic method computeIfAbsent(p0: java.lang.Object, p1: java.util.function.Function): java.lang.Object + public method computeIfPresent(p0: java.lang.Integer, p1: java.util.function.BiFunction): java.lang.Double + public synthetic method computeIfPresent(p0: java.lang.Object, p1: java.util.function.BiFunction): java.lang.Object + public method containsKey(p0: int): boolean + public bridge final method containsKey(p0: java.lang.Object): boolean + public method containsValue(p0: double): boolean + public bridge final method containsValue(p0: java.lang.Object): boolean + public bridge final method entrySet(): java.util.Set + public @org.jetbrains.annotations.Nullable method get(p0: int): java.lang.Double + public bridge final method get(p0: java.lang.Object): java.lang.Object + public @org.jetbrains.annotations.NotNull method getEntries(): java.util.Set + public @org.jetbrains.annotations.NotNull method getKeys(): java.util.Set + public method getSize(): int + public @org.jetbrains.annotations.NotNull method getValues(): java.util.Collection + public method isEmpty(): boolean + public bridge final method keySet(): java.util.Set + public method merge(p0: java.lang.Integer, p1: java.lang.Double, p2: java.util.function.BiFunction): java.lang.Double + public synthetic method merge(p0: java.lang.Object, p1: java.lang.Object, p2: java.util.function.BiFunction): java.lang.Object + public method put(p0: int, p1: double): java.lang.Double + public synthetic method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public method putAll(p0: java.util.Map): void + public method putIfAbsent(p0: java.lang.Integer, p1: java.lang.Double): java.lang.Double + public synthetic method putIfAbsent(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public method remove(p0: java.lang.Object): java.lang.Object + public method remove(p0: java.lang.Object, p1: java.lang.Object): boolean + public method replace(p0: java.lang.Integer, p1: java.lang.Double): java.lang.Double + public method replace(p0: java.lang.Integer, p1: java.lang.Double, p2: java.lang.Double): boolean + public synthetic method replace(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public synthetic method replace(p0: java.lang.Object, p1: java.lang.Object, p2: java.lang.Object): boolean + public method replaceAll(p0: java.util.function.BiFunction): void + public bridge final method size(): int + public bridge final method values(): java.util.Collection +} + +@kotlin.Metadata +public final class DIntMapEntry { + // source: 'collectionByDelegation3WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Map$Entry + public method (@org.jetbrains.annotations.NotNull p0: java.util.Map$Entry): void + public @org.jetbrains.annotations.NotNull method getKey(): java.lang.Integer + public synthetic bridge method getKey(): java.lang.Object + public @org.jetbrains.annotations.NotNull method getValue(): java.lang.Double + public synthetic bridge method getValue(): java.lang.Object + public method setValue(p0: double): java.lang.Double + public synthetic method setValue(p0: java.lang.Object): java.lang.Object +} + +@kotlin.Metadata +public final class DIntSet { + // source: 'collectionByDelegation3WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Set + public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): void + public method add(p0: int): boolean + public synthetic method add(p0: java.lang.Object): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(p0: int): boolean + public bridge final 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3WithFullJdk_ir.txt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3WithFullJdk_ir.txt new file mode 100644 index 00000000000..b22f1a485a7 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3WithFullJdk_ir.txt @@ -0,0 +1,232 @@ +@kotlin.Metadata +public final class DIntCollection { + // source: 'collectionByDelegation3WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Collection + public method (@org.jetbrains.annotations.NotNull p0: java.util.Collection): void + public method add(p0: int): boolean + public synthetic bridge method add(p0: java.lang.Object): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(p0: int): boolean + public bridge final 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 removeIf(p0: java.util.function.Predicate): boolean + public method retainAll(p0: java.util.Collection): boolean + public bridge final method size(): int + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DIntCollectionByList { + // source: 'collectionByDelegation3WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.List + public method (@org.jetbrains.annotations.NotNull p0: java.util.List): void + public method add(p0: int): boolean + public synthetic bridge method add(p0: java.lang.Object): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(p0: int): boolean + public bridge final 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 removeIf(p0: java.util.function.Predicate): boolean + public method retainAll(p0: java.util.Collection): boolean + public bridge final method size(): int + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DIntCollectionBySet { + // source: 'collectionByDelegation3WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Set + public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): void + public method add(p0: int): boolean + public synthetic bridge method add(p0: java.lang.Object): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(p0: int): boolean + public bridge final 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 removeIf(p0: java.util.function.Predicate): boolean + public method retainAll(p0: java.util.Collection): boolean + public bridge final method size(): int + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DIntIterable { + // source: 'collectionByDelegation3WithFullJdk.kt' + private synthetic final field $$delegate_0: java.lang.Iterable + public method (@org.jetbrains.annotations.NotNull p0: java.lang.Iterable): void + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator +} + +@kotlin.Metadata +public final class DIntIterator { + // source: 'collectionByDelegation3WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Iterator + public method (@org.jetbrains.annotations.NotNull p0: java.util.Iterator): void + public method hasNext(): boolean + public @org.jetbrains.annotations.NotNull method next(): java.lang.Integer + public synthetic bridge method next(): java.lang.Object + public method remove(): void +} + +@kotlin.Metadata +public final class DIntList { + // source: 'collectionByDelegation3WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.List + public method (@org.jetbrains.annotations.NotNull p0: java.util.List): void + public method add(p0: int): boolean + public method add(p0: int, p1: int): void + public synthetic bridge method add(p0: int, p1: java.lang.Object): void + public synthetic bridge method add(p0: java.lang.Object): boolean + public method addAll(p0: int, p1: java.util.Collection): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(p0: int): boolean + public bridge final method contains(p0: java.lang.Object): boolean + public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean + public @org.jetbrains.annotations.NotNull method get(p0: int): java.lang.Integer + public synthetic bridge method get(p0: int): java.lang.Object + public method getSize(): int + public method indexOf(p0: int): int + public bridge final method indexOf(p0: java.lang.Object): int + public method isEmpty(): boolean + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator + public method lastIndexOf(p0: int): int + public bridge final method lastIndexOf(p0: java.lang.Object): int + public @org.jetbrains.annotations.NotNull method listIterator(): java.util.ListIterator + public @org.jetbrains.annotations.NotNull method listIterator(p0: int): java.util.ListIterator + public method remove(p0: int): int + public synthetic bridge method remove(p0: int): java.lang.Object + public method remove(p0: java.lang.Object): boolean + public method removeAll(p0: java.util.Collection): boolean + public method replaceAll(p0: java.util.function.UnaryOperator): void + public method retainAll(p0: java.util.Collection): boolean + public method set(p0: int, p1: int): java.lang.Integer + public synthetic bridge method set(p0: int, p1: java.lang.Object): java.lang.Object + public bridge final method size(): int + public method sort(p0: java.util.Comparator): void + public @org.jetbrains.annotations.NotNull method subList(p0: int, p1: int): java.util.List + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DIntListIterator { + // source: 'collectionByDelegation3WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.ListIterator + public method (@org.jetbrains.annotations.NotNull p0: java.util.ListIterator): void + public method add(p0: int): void + public synthetic bridge method add(p0: java.lang.Object): void + public method hasNext(): boolean + public method hasPrevious(): boolean + public @org.jetbrains.annotations.NotNull method next(): java.lang.Integer + public synthetic bridge method next(): java.lang.Object + public method nextIndex(): int + public @org.jetbrains.annotations.NotNull method previous(): java.lang.Integer + public synthetic bridge method previous(): java.lang.Object + public method previousIndex(): int + public method remove(): void + public method set(p0: int): void + public synthetic bridge method set(p0: java.lang.Object): void +} + +@kotlin.Metadata +public final class DIntMap { + // source: 'collectionByDelegation3WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Map + public method (@org.jetbrains.annotations.NotNull p0: java.util.Map): void + public method clear(): void + public method compute(p0: int, p1: java.util.function.BiFunction): java.lang.Double + public synthetic bridge method compute(p0: java.lang.Object, p1: java.util.function.BiFunction): java.lang.Object + public method computeIfAbsent(p0: int, p1: java.util.function.Function): java.lang.Double + public synthetic bridge method computeIfAbsent(p0: java.lang.Object, p1: java.util.function.Function): java.lang.Object + public method computeIfPresent(p0: int, p1: java.util.function.BiFunction): java.lang.Double + public synthetic bridge method computeIfPresent(p0: java.lang.Object, p1: java.util.function.BiFunction): java.lang.Object + public method containsKey(p0: int): boolean + public bridge final method containsKey(p0: java.lang.Object): boolean + public method containsValue(p0: double): boolean + public bridge final method containsValue(p0: java.lang.Object): boolean + public bridge final method entrySet(): java.util.Set + public @org.jetbrains.annotations.Nullable method get(p0: int): java.lang.Double + public bridge final method get(p0: java.lang.Object): java.lang.Double + public synthetic bridge method get(p0: java.lang.Object): java.lang.Object + public @org.jetbrains.annotations.NotNull method getEntries(): java.util.Set + public @org.jetbrains.annotations.NotNull method getKeys(): java.util.Set + public method getSize(): int + public @org.jetbrains.annotations.NotNull method getValues(): java.util.Collection + public method isEmpty(): boolean + public bridge final method keySet(): java.util.Set + public method merge(p0: int, p1: double, p2: java.util.function.BiFunction): java.lang.Double + public synthetic bridge method merge(p0: java.lang.Object, p1: java.lang.Object, p2: java.util.function.BiFunction): java.lang.Object + public method put(p0: int, p1: double): java.lang.Double + public synthetic bridge method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public method putAll(p0: java.util.Map): void + public method putIfAbsent(p0: int, p1: double): java.lang.Double + public synthetic bridge method putIfAbsent(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public method remove(p0: java.lang.Object): java.lang.Double + public synthetic bridge method remove(p0: java.lang.Object): java.lang.Object + public method remove(p0: java.lang.Object, p1: java.lang.Object): boolean + public method replace(p0: int, p1: double): java.lang.Double + public method replace(p0: int, p1: double, p2: double): boolean + public synthetic bridge method replace(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public synthetic bridge method replace(p0: java.lang.Object, p1: java.lang.Object, p2: java.lang.Object): boolean + public method replaceAll(p0: java.util.function.BiFunction): void + public bridge final method size(): int + public bridge final method values(): java.util.Collection +} + +@kotlin.Metadata +public final class DIntMapEntry { + // source: 'collectionByDelegation3WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Map$Entry + public method (@org.jetbrains.annotations.NotNull p0: java.util.Map$Entry): void + public @org.jetbrains.annotations.NotNull method getKey(): java.lang.Integer + public synthetic bridge method getKey(): java.lang.Object + public @org.jetbrains.annotations.NotNull method getValue(): java.lang.Double + public synthetic bridge method getValue(): java.lang.Object + public method setValue(p0: double): java.lang.Double + public synthetic bridge method setValue(p0: java.lang.Object): java.lang.Object +} + +@kotlin.Metadata +public final class DIntSet { + // source: 'collectionByDelegation3WithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Set + public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): void + public method add(p0: int): boolean + public synthetic bridge method add(p0: java.lang.Object): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(p0: int): boolean + public bridge final 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3_ir.txt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3_ir.txt new file mode 100644 index 00000000000..54b2f1257dd --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3_ir.txt @@ -0,0 +1,211 @@ +@kotlin.Metadata +public final class DIntCollection { + // source: 'collectionByDelegation3.kt' + private synthetic final field $$delegate_0: java.util.Collection + public method (@org.jetbrains.annotations.NotNull p0: java.util.Collection): void + public method add(p0: int): boolean + public synthetic bridge method add(p0: java.lang.Object): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(p0: int): boolean + public bridge final 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DIntCollectionByList { + // source: 'collectionByDelegation3.kt' + private synthetic final field $$delegate_0: java.util.List + public method (@org.jetbrains.annotations.NotNull p0: java.util.List): void + public method add(p0: int): boolean + public synthetic bridge method add(p0: java.lang.Object): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(p0: int): boolean + public bridge final 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DIntCollectionBySet { + // source: 'collectionByDelegation3.kt' + private synthetic final field $$delegate_0: java.util.Set + public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): void + public method add(p0: int): boolean + public synthetic bridge method add(p0: java.lang.Object): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(p0: int): boolean + public bridge final 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DIntIterable { + // source: 'collectionByDelegation3.kt' + private synthetic final field $$delegate_0: java.lang.Iterable + public method (@org.jetbrains.annotations.NotNull p0: java.lang.Iterable): void + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator +} + +@kotlin.Metadata +public final class DIntIterator { + // source: 'collectionByDelegation3.kt' + private synthetic final field $$delegate_0: java.util.Iterator + public method (@org.jetbrains.annotations.NotNull p0: java.util.Iterator): void + public method hasNext(): boolean + public @org.jetbrains.annotations.NotNull method next(): java.lang.Integer + public synthetic bridge method next(): java.lang.Object + public method remove(): void +} + +@kotlin.Metadata +public final class DIntList { + // source: 'collectionByDelegation3.kt' + private synthetic final field $$delegate_0: java.util.List + public method (@org.jetbrains.annotations.NotNull p0: java.util.List): void + public method add(p0: int): boolean + public method add(p0: int, p1: int): void + public synthetic bridge method add(p0: int, p1: java.lang.Object): void + public synthetic bridge method add(p0: java.lang.Object): boolean + public method addAll(p0: int, p1: java.util.Collection): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(p0: int): boolean + public bridge final method contains(p0: java.lang.Object): boolean + public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean + public @org.jetbrains.annotations.NotNull method get(p0: int): java.lang.Integer + public synthetic bridge method get(p0: int): java.lang.Object + public method getSize(): int + public method indexOf(p0: int): int + public bridge final method indexOf(p0: java.lang.Object): int + public method isEmpty(): boolean + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator + public method lastIndexOf(p0: int): int + public bridge final method lastIndexOf(p0: java.lang.Object): int + public @org.jetbrains.annotations.NotNull method listIterator(): java.util.ListIterator + public @org.jetbrains.annotations.NotNull method listIterator(p0: int): java.util.ListIterator + public method remove(p0: int): int + public synthetic bridge method remove(p0: int): java.lang.Object + 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 method set(p0: int, p1: int): java.lang.Integer + public synthetic bridge method set(p0: int, p1: java.lang.Object): java.lang.Object + public bridge final method size(): int + public @org.jetbrains.annotations.NotNull method subList(p0: int, p1: int): java.util.List + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DIntListIterator { + // source: 'collectionByDelegation3.kt' + private synthetic final field $$delegate_0: java.util.ListIterator + public method (@org.jetbrains.annotations.NotNull p0: java.util.ListIterator): void + public method add(p0: int): void + public synthetic bridge method add(p0: java.lang.Object): void + public method hasNext(): boolean + public method hasPrevious(): boolean + public @org.jetbrains.annotations.NotNull method next(): java.lang.Integer + public synthetic bridge method next(): java.lang.Object + public method nextIndex(): int + public @org.jetbrains.annotations.NotNull method previous(): java.lang.Integer + public synthetic bridge method previous(): java.lang.Object + public method previousIndex(): int + public method remove(): void + public method set(p0: int): void + public synthetic bridge method set(p0: java.lang.Object): void +} + +@kotlin.Metadata +public final class DIntMap { + // source: 'collectionByDelegation3.kt' + private synthetic final field $$delegate_0: java.util.Map + public method (@org.jetbrains.annotations.NotNull p0: java.util.Map): void + public method clear(): void + public method containsKey(p0: int): boolean + public bridge final method containsKey(p0: java.lang.Object): boolean + public method containsValue(p0: double): boolean + public bridge final method containsValue(p0: java.lang.Object): boolean + public bridge final method entrySet(): java.util.Set + public @org.jetbrains.annotations.Nullable method get(p0: int): java.lang.Double + public bridge final method get(p0: java.lang.Object): java.lang.Double + public synthetic bridge method get(p0: java.lang.Object): java.lang.Object + public @org.jetbrains.annotations.NotNull method getEntries(): java.util.Set + public @org.jetbrains.annotations.NotNull method getKeys(): java.util.Set + public method getSize(): int + public @org.jetbrains.annotations.NotNull method getValues(): java.util.Collection + public method isEmpty(): boolean + public bridge final method keySet(): java.util.Set + public method put(p0: int, p1: double): java.lang.Double + public synthetic bridge method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public method putAll(p0: java.util.Map): void + public method remove(p0: java.lang.Object): java.lang.Double + public synthetic bridge method remove(p0: java.lang.Object): java.lang.Object + public bridge final method size(): int + public bridge final method values(): java.util.Collection +} + +@kotlin.Metadata +public final class DIntMapEntry { + // source: 'collectionByDelegation3.kt' + private synthetic final field $$delegate_0: java.util.Map$Entry + public method (@org.jetbrains.annotations.NotNull p0: java.util.Map$Entry): void + public @org.jetbrains.annotations.NotNull method getKey(): java.lang.Integer + public synthetic bridge method getKey(): java.lang.Object + public @org.jetbrains.annotations.NotNull method getValue(): java.lang.Double + public synthetic bridge method getValue(): java.lang.Object + public method setValue(p0: double): java.lang.Double + public synthetic bridge method setValue(p0: java.lang.Object): java.lang.Object +} + +@kotlin.Metadata +public final class DIntSet { + // source: 'collectionByDelegation3.kt' + private synthetic final field $$delegate_0: java.util.Set + public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): void + public method add(p0: int): boolean + public synthetic bridge method add(p0: java.lang.Object): boolean + public method addAll(p0: java.util.Collection): boolean + public method clear(): void + public method contains(p0: int): boolean + public bridge final 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegationWithFullJdk.kt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegationWithFullJdk.kt new file mode 100644 index 00000000000..f52c311e4d6 --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegationWithFullJdk.kt @@ -0,0 +1,20 @@ +// FULL_JDK +class DGenericIterator(d: Iterator) : Iterator by d + +class DGenericListIterator(d: ListIterator) : ListIterator by d + +class DGenericIterable(d: Iterable) : Iterable by d + +class DGenericCollection(d: Collection) : Collection by d + +class DGenericSet(d: Set) : Set by d + +class DGenericList(d: List) : List by d + +class DGenericMap(d: Map) : Map by d + +class DGenericMapEntry(d: Map.Entry) : Map.Entry by d + +class DGenericCollectionBySet(d: Set) : Collection by d + +class DGenericCollectionByList(d: List) : Collection by d \ No newline at end of file diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegationWithFullJdk.txt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegationWithFullJdk.txt new file mode 100644 index 00000000000..a025e6a9f1c --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegationWithFullJdk.txt @@ -0,0 +1,195 @@ +@kotlin.Metadata +public final class DGenericCollection { + // source: 'collectionByDelegationWithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Collection + public method (@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 removeIf(p0: java.util.function.Predicate): boolean + public method retainAll(p0: java.util.Collection): boolean + public bridge final method size(): int + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DGenericCollectionByList { + // source: 'collectionByDelegationWithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.List + public method (@org.jetbrains.annotations.NotNull p0: java.util.List): 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 removeIf(p0: java.util.function.Predicate): boolean + public method retainAll(p0: java.util.Collection): boolean + public bridge final method size(): int + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DGenericCollectionBySet { + // source: 'collectionByDelegationWithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Set + public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): 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 removeIf(p0: java.util.function.Predicate): boolean + public method retainAll(p0: java.util.Collection): boolean + public bridge final method size(): int + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DGenericIterable { + // source: 'collectionByDelegationWithFullJdk.kt' + private synthetic final field $$delegate_0: java.lang.Iterable + public method (@org.jetbrains.annotations.NotNull p0: java.lang.Iterable): void + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator +} + +@kotlin.Metadata +public final class DGenericIterator { + // source: 'collectionByDelegationWithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Iterator + public method (@org.jetbrains.annotations.NotNull p0: java.util.Iterator): void + public method hasNext(): boolean + public method next(): java.lang.Object + public method remove(): void +} + +@kotlin.Metadata +public final class DGenericList { + // source: 'collectionByDelegationWithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.List + public method (@org.jetbrains.annotations.NotNull p0: java.util.List): void + public method add(p0: int, p1: java.lang.Object): void + public method add(p0: java.lang.Object): boolean + public method addAll(p0: int, p1: java.util.Collection): 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 get(p0: int): java.lang.Object + public method getSize(): int + public method indexOf(p0: java.lang.Object): int + public method isEmpty(): boolean + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator + public method lastIndexOf(p0: java.lang.Object): int + public @org.jetbrains.annotations.NotNull method listIterator(): java.util.ListIterator + public @org.jetbrains.annotations.NotNull method listIterator(p0: int): java.util.ListIterator + public method remove(p0: int): java.lang.Object + public method remove(p0: java.lang.Object): boolean + public method removeAll(p0: java.util.Collection): boolean + public method replaceAll(p0: java.util.function.UnaryOperator): void + public method retainAll(p0: java.util.Collection): boolean + public method set(p0: int, p1: java.lang.Object): java.lang.Object + public bridge final method size(): int + public method sort(p0: java.util.Comparator): void + public @org.jetbrains.annotations.NotNull method subList(p0: int, p1: int): java.util.List + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DGenericListIterator { + // source: 'collectionByDelegationWithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.ListIterator + public method (@org.jetbrains.annotations.NotNull p0: java.util.ListIterator): void + public method add(p0: java.lang.Object): void + public method hasNext(): boolean + public method hasPrevious(): boolean + public method next(): java.lang.Object + public method nextIndex(): int + public method previous(): java.lang.Object + public method previousIndex(): int + public method remove(): void + public method set(p0: java.lang.Object): void +} + +@kotlin.Metadata +public final class DGenericMap { + // source: 'collectionByDelegationWithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Map + public method (@org.jetbrains.annotations.NotNull p0: java.util.Map): void + public method clear(): void + public method compute(p0: java.lang.Object, p1: java.util.function.BiFunction): java.lang.Object + public method computeIfAbsent(p0: java.lang.Object, p1: java.util.function.Function): java.lang.Object + public method computeIfPresent(p0: java.lang.Object, p1: java.util.function.BiFunction): java.lang.Object + public method containsKey(p0: java.lang.Object): boolean + public method containsValue(p0: java.lang.Object): boolean + public bridge final method entrySet(): java.util.Set + public @org.jetbrains.annotations.Nullable method get(p0: java.lang.Object): java.lang.Object + public @org.jetbrains.annotations.NotNull method getEntries(): java.util.Set + public @org.jetbrains.annotations.NotNull method getKeys(): java.util.Set + public method getSize(): int + public @org.jetbrains.annotations.NotNull method getValues(): java.util.Collection + public method isEmpty(): boolean + public bridge final method keySet(): java.util.Set + public method merge(p0: java.lang.Object, p1: java.lang.Object, p2: java.util.function.BiFunction): java.lang.Object + public method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public method putAll(p0: java.util.Map): void + public method putIfAbsent(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public method remove(p0: java.lang.Object): java.lang.Object + public method remove(p0: java.lang.Object, p1: java.lang.Object): boolean + public method replace(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public method replace(p0: java.lang.Object, p1: java.lang.Object, p2: java.lang.Object): boolean + public method replaceAll(p0: java.util.function.BiFunction): void + public bridge final method size(): int + public bridge final method values(): java.util.Collection +} + +@kotlin.Metadata +public final class DGenericMapEntry { + // source: 'collectionByDelegationWithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Map$Entry + public method (@org.jetbrains.annotations.NotNull p0: java.util.Map$Entry): void + public method getKey(): java.lang.Object + public method getValue(): java.lang.Object + public method setValue(p0: java.lang.Object): java.lang.Object +} + +@kotlin.Metadata +public final class DGenericSet { + // source: 'collectionByDelegationWithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Set + public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegationWithFullJdk_ir.txt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegationWithFullJdk_ir.txt new file mode 100644 index 00000000000..a025e6a9f1c --- /dev/null +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegationWithFullJdk_ir.txt @@ -0,0 +1,195 @@ +@kotlin.Metadata +public final class DGenericCollection { + // source: 'collectionByDelegationWithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Collection + public method (@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 removeIf(p0: java.util.function.Predicate): boolean + public method retainAll(p0: java.util.Collection): boolean + public bridge final method size(): int + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DGenericCollectionByList { + // source: 'collectionByDelegationWithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.List + public method (@org.jetbrains.annotations.NotNull p0: java.util.List): 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 removeIf(p0: java.util.function.Predicate): boolean + public method retainAll(p0: java.util.Collection): boolean + public bridge final method size(): int + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DGenericCollectionBySet { + // source: 'collectionByDelegationWithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Set + public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): 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 removeIf(p0: java.util.function.Predicate): boolean + public method retainAll(p0: java.util.Collection): boolean + public bridge final method size(): int + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DGenericIterable { + // source: 'collectionByDelegationWithFullJdk.kt' + private synthetic final field $$delegate_0: java.lang.Iterable + public method (@org.jetbrains.annotations.NotNull p0: java.lang.Iterable): void + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator +} + +@kotlin.Metadata +public final class DGenericIterator { + // source: 'collectionByDelegationWithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Iterator + public method (@org.jetbrains.annotations.NotNull p0: java.util.Iterator): void + public method hasNext(): boolean + public method next(): java.lang.Object + public method remove(): void +} + +@kotlin.Metadata +public final class DGenericList { + // source: 'collectionByDelegationWithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.List + public method (@org.jetbrains.annotations.NotNull p0: java.util.List): void + public method add(p0: int, p1: java.lang.Object): void + public method add(p0: java.lang.Object): boolean + public method addAll(p0: int, p1: java.util.Collection): 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 get(p0: int): java.lang.Object + public method getSize(): int + public method indexOf(p0: java.lang.Object): int + public method isEmpty(): boolean + public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator + public method lastIndexOf(p0: java.lang.Object): int + public @org.jetbrains.annotations.NotNull method listIterator(): java.util.ListIterator + public @org.jetbrains.annotations.NotNull method listIterator(p0: int): java.util.ListIterator + public method remove(p0: int): java.lang.Object + public method remove(p0: java.lang.Object): boolean + public method removeAll(p0: java.util.Collection): boolean + public method replaceAll(p0: java.util.function.UnaryOperator): void + public method retainAll(p0: java.util.Collection): boolean + public method set(p0: int, p1: java.lang.Object): java.lang.Object + public bridge final method size(): int + public method sort(p0: java.util.Comparator): void + public @org.jetbrains.annotations.NotNull method subList(p0: int, p1: int): java.util.List + public method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} + +@kotlin.Metadata +public final class DGenericListIterator { + // source: 'collectionByDelegationWithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.ListIterator + public method (@org.jetbrains.annotations.NotNull p0: java.util.ListIterator): void + public method add(p0: java.lang.Object): void + public method hasNext(): boolean + public method hasPrevious(): boolean + public method next(): java.lang.Object + public method nextIndex(): int + public method previous(): java.lang.Object + public method previousIndex(): int + public method remove(): void + public method set(p0: java.lang.Object): void +} + +@kotlin.Metadata +public final class DGenericMap { + // source: 'collectionByDelegationWithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Map + public method (@org.jetbrains.annotations.NotNull p0: java.util.Map): void + public method clear(): void + public method compute(p0: java.lang.Object, p1: java.util.function.BiFunction): java.lang.Object + public method computeIfAbsent(p0: java.lang.Object, p1: java.util.function.Function): java.lang.Object + public method computeIfPresent(p0: java.lang.Object, p1: java.util.function.BiFunction): java.lang.Object + public method containsKey(p0: java.lang.Object): boolean + public method containsValue(p0: java.lang.Object): boolean + public bridge final method entrySet(): java.util.Set + public @org.jetbrains.annotations.Nullable method get(p0: java.lang.Object): java.lang.Object + public @org.jetbrains.annotations.NotNull method getEntries(): java.util.Set + public @org.jetbrains.annotations.NotNull method getKeys(): java.util.Set + public method getSize(): int + public @org.jetbrains.annotations.NotNull method getValues(): java.util.Collection + public method isEmpty(): boolean + public bridge final method keySet(): java.util.Set + public method merge(p0: java.lang.Object, p1: java.lang.Object, p2: java.util.function.BiFunction): java.lang.Object + public method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public method putAll(p0: java.util.Map): void + public method putIfAbsent(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public method remove(p0: java.lang.Object): java.lang.Object + public method remove(p0: java.lang.Object, p1: java.lang.Object): boolean + public method replace(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object + public method replace(p0: java.lang.Object, p1: java.lang.Object, p2: java.lang.Object): boolean + public method replaceAll(p0: java.util.function.BiFunction): void + public bridge final method size(): int + public bridge final method values(): java.util.Collection +} + +@kotlin.Metadata +public final class DGenericMapEntry { + // source: 'collectionByDelegationWithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Map$Entry + public method (@org.jetbrains.annotations.NotNull p0: java.util.Map$Entry): void + public method getKey(): java.lang.Object + public method getValue(): java.lang.Object + public method setValue(p0: java.lang.Object): java.lang.Object +} + +@kotlin.Metadata +public final class DGenericSet { + // source: 'collectionByDelegationWithFullJdk.kt' + private synthetic final field $$delegate_0: java.util.Set + public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): 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 method toArray(): java.lang.Object[] + public method toArray(p0: java.lang.Object[]): java.lang.Object[] +} diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation_ir.txt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation_ir.txt deleted file mode 100644 index fa1f8b102a3..00000000000 --- a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation_ir.txt +++ /dev/null @@ -1,29 +0,0 @@ -@kotlin.Metadata -public final class SimplePlatform { - // source: 'collectionByDelegation.kt' - public method (): void -} - -@kotlin.Metadata -public class TargetPlatform { - // source: 'collectionByDelegation.kt' - private final @org.jetbrains.annotations.NotNull field componentPlatforms: java.util.Set - public method (@org.jetbrains.annotations.NotNull p0: java.util.Set): void - public method add(p0: SimplePlatform): boolean - public synthetic bridge method add(p0: java.lang.Object): boolean - public method addAll(p0: java.util.Collection): boolean - public method clear(): void - public method contains(@org.jetbrains.annotations.NotNull p0: SimplePlatform): boolean - public bridge final method contains(p0: java.lang.Object): boolean - public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean - public final @org.jetbrains.annotations.NotNull method getComponentPlatforms(): java.util.Set - 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 method toArray(): java.lang.Object[] - public method toArray(p0: java.lang.Object[]): java.lang.Object[] -} diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java index cef0eda4d3b..3bc07ccaac1 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java @@ -234,6 +234,31 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest { runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation.kt"); } + @TestMetadata("collectionByDelegation2.kt") + public void testCollectionByDelegation2() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2.kt"); + } + + @TestMetadata("collectionByDelegation2WithFullJdk.kt") + public void testCollectionByDelegation2WithFullJdk() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2WithFullJdk.kt"); + } + + @TestMetadata("collectionByDelegation3.kt") + public void testCollectionByDelegation3() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3.kt"); + } + + @TestMetadata("collectionByDelegation3WithFullJdk.kt") + public void testCollectionByDelegation3WithFullJdk() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3WithFullJdk.kt"); + } + + @TestMetadata("collectionByDelegationWithFullJdk.kt") + public void testCollectionByDelegationWithFullJdk() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegationWithFullJdk.kt"); + } + @TestMetadata("collectionsWithFullJdk.kt") public void testCollectionsWithFullJdk() throws Exception { runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/collectionsWithFullJdk.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java index 5437f1fe1a8..b4d2b3ccd65 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java @@ -234,6 +234,31 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation.kt"); } + @TestMetadata("collectionByDelegation2.kt") + public void testCollectionByDelegation2() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2.kt"); + } + + @TestMetadata("collectionByDelegation2WithFullJdk.kt") + public void testCollectionByDelegation2WithFullJdk() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2WithFullJdk.kt"); + } + + @TestMetadata("collectionByDelegation3.kt") + public void testCollectionByDelegation3() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3.kt"); + } + + @TestMetadata("collectionByDelegation3WithFullJdk.kt") + public void testCollectionByDelegation3WithFullJdk() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3WithFullJdk.kt"); + } + + @TestMetadata("collectionByDelegationWithFullJdk.kt") + public void testCollectionByDelegationWithFullJdk() throws Exception { + runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegationWithFullJdk.kt"); + } + @TestMetadata("collectionsWithFullJdk.kt") public void testCollectionsWithFullJdk() throws Exception { runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/collectionsWithFullJdk.kt");