From 6322198a11635fa08d1a1441912d5fe5949bd1b0 Mon Sep 17 00:00:00 2001 From: Denis Zharkov Date: Tue, 13 Oct 2015 20:49:31 +0300 Subject: [PATCH] Revert 'isEmpty' transformation --- compiler/testData/builtin-classes.txt | 24 ++++++---------- .../codegen/box/bridges/strListContains.kt | 2 +- .../box/builtinStubMethods/Collection.kt | 2 +- .../codegen/box/builtinStubMethods/List.kt | 2 +- .../ListWithAllImplementations.kt | 2 +- .../ListWithAllInheritedImplementations.kt | 2 +- .../codegen/box/builtinStubMethods/Map.kt | 2 +- .../MapWithAllImplementations.kt | 2 +- .../box/builtinStubMethods/SubstitutedList.kt | 2 +- .../implementationInTrait.kt | 2 +- .../inheritedImplementations.kt | 2 +- .../manyTypeParametersWithUpperBounds.kt | 4 +-- .../nonTrivialSubstitution.kt | 2 +- .../codegen/box/builtinsProperties/bridges.kt | 8 +++--- .../box/builtinsProperties/collectionImpl.kt | 2 +- .../codegen/box/builtinsProperties/maps.kt | 2 +- .../substitutedList/substitutedList.kt | 2 +- .../collections/mutableList/mutableList.kt | 2 +- .../collections/removeAtInt/removeAtInt.kt | 3 +- .../collections/strList/strList.kt | 2 +- .../class/ExtendsAbstractListT.txt | 2 +- .../class/ImplementsListString.txt | 2 +- .../ValAndFunOverrideCompatibilityClash.txt | 2 +- .../diagnostics/tests/exposed/typeArgs.txt | 2 +- .../tests/j+k/GenericsInSupertypes.txt | 2 +- .../j+k/collectionOverrides/contains.txt | 10 +++---- .../j+k/collectionOverrides/containsAll.txt | 10 +++---- .../containsAndOverload.txt | 4 +-- .../collectionOverrides/mapGetOverride.txt | 2 +- .../overridesBuiltinNoMagic.txt | 4 +-- .../j+k/collectionOverrides/removeAt.txt | 4 +-- .../j+k/collectionOverrides/removeAtInt.txt | 4 +-- .../tests/j+k/finalCollectionSize.txt | 4 +-- .../diagnostics/tests/j+k/specialBridges.txt | 2 +- .../diagnostics/tests/library/Collections.kt | 8 +++--- .../listSuperType.txt | 2 +- .../multipleExactBoundsNullable.txt | 2 +- .../nullabilityWarnings/delegation.txt | 6 ++-- .../platformTypes/supertypeTypeArguments.txt | 4 +-- .../diagnostics/tests/scopes/visibility2.txt | 2 +- .../diagnostics/tests/subtyping/kt-1457.txt | 2 +- .../customClassMutableCollection.txt | 2 +- .../customClassMutableList.txt | 2 +- .../invalidFqName.txt | 4 +-- .../wrongTypeParametersCount.txt | 2 +- .../return/HalfSubstitutedTypeParameters.txt | 2 +- .../return/SubclassOfCollection.txt | 2 +- .../modality/ModalityOfFakeOverrides.txt | 2 +- .../return/HalfSubstitutedTypeParameters.txt | 3 +- .../return/SubclassOfCollection.txt | 3 +- .../modality/ModalityOfFakeOverrides.txt | 3 +- .../platformTypes/notnullTypeArgument.txt | 3 +- .../platformTypes/nullableTypeArgument.txt | 3 +- core/builtins/native/kotlin/Collections.kt | 8 +++--- .../jetbrains/kotlin/util/OperatorChecker.kt | 2 +- ...otlinGenerateSecondaryConstructorAction.kt | 4 +-- js/js.libraries/src/core/javautil.kt | 4 +-- js/js.libraries/src/core/regex.kt | 2 +- .../testData/java/arrayList/cases/isEmpty.kt | 2 +- .../testData/java/arrayList/cases/misc.kt | 4 +-- js/js.translator/testData/kotlin_lib.js | 8 ++---- js/js.translator/testData/maps.js | 28 ++++++++----------- .../rtti/cases/stdlibEmptyListClass.kt | 2 +- libraries/stdlib/src/generated/_Arrays.kt | 16 +++++------ .../kotlin/collections/DeprecatedBuiltins.kt | 7 ----- .../stdlib/src/kotlin/collections/JUtil.kt | 2 +- .../src/kotlin/collections/MapWithDefault.kt | 4 +-- .../stdlib/src/kotlin/collections/Maps.kt | 2 +- .../stdlib/src/kotlin/collections/Sets.kt | 2 +- .../stdlib/src/kotlin/text/regex/RegexJVM.kt | 2 +- .../src/templates/SpecialJVM.kt | 2 +- 71 files changed, 127 insertions(+), 156 deletions(-) diff --git a/compiler/testData/builtin-classes.txt b/compiler/testData/builtin-classes.txt index 19b8da7b045..e35fc374df9 100644 --- a/compiler/testData/builtin-classes.txt +++ b/compiler/testData/builtin-classes.txt @@ -273,12 +273,11 @@ public interface Cloneable { } public interface Collection : kotlin.Iterable { - public abstract val isEmpty: kotlin.Boolean - public abstract fun (): kotlin.Boolean public abstract val size: kotlin.Int public abstract fun (): kotlin.Int public abstract operator fun contains(/*0*/ o: @kotlin.UnsafeVariance() E): kotlin.Boolean public abstract fun containsAll(/*0*/ c: kotlin.Collection<@kotlin.UnsafeVariance() E>): kotlin.Boolean + public abstract fun isEmpty(): kotlin.Boolean public abstract override /*1*/ fun iterator(): kotlin.Iterator } @@ -767,14 +766,13 @@ public interface Iterator { } public interface List : kotlin.Collection { - public abstract override /*1*/ val isEmpty: kotlin.Boolean - public abstract override /*1*/ fun (): kotlin.Boolean public abstract override /*1*/ val size: kotlin.Int public abstract override /*1*/ fun (): kotlin.Int public abstract override /*1*/ fun contains(/*0*/ o: @kotlin.UnsafeVariance() E): kotlin.Boolean public abstract override /*1*/ fun containsAll(/*0*/ c: kotlin.Collection<@kotlin.UnsafeVariance() E>): kotlin.Boolean public abstract operator fun get(/*0*/ index: kotlin.Int): E public abstract fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public abstract override /*1*/ fun isEmpty(): kotlin.Boolean public abstract override /*1*/ fun iterator(): kotlin.Iterator public abstract fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public abstract fun listIterator(): kotlin.ListIterator @@ -930,8 +928,6 @@ public final class LongRange : kotlin.Range, kotlin.Progression { public abstract val entries: kotlin.Set> public abstract fun (): kotlin.Set> - public abstract val isEmpty: kotlin.Boolean - public abstract fun (): kotlin.Boolean public abstract val keys: kotlin.Set public abstract fun (): kotlin.Set public abstract val size: kotlin.Int @@ -941,6 +937,7 @@ public interface Map { public abstract fun containsKey(/*0*/ key: K): kotlin.Boolean public abstract fun containsValue(/*0*/ value: @kotlin.UnsafeVariance() V): kotlin.Boolean public abstract operator fun get(/*0*/ key: K): V? + public abstract fun isEmpty(): kotlin.Boolean public interface Entry { public abstract val key: K @@ -951,8 +948,6 @@ public interface Map { } public interface MutableCollection : kotlin.Collection, kotlin.MutableIterable { - public abstract override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean - public abstract override /*1*/ /*fake_override*/ fun (): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ val size: kotlin.Int public abstract override /*1*/ /*fake_override*/ fun (): kotlin.Int public abstract fun add(/*0*/ e: E): kotlin.Boolean @@ -960,6 +955,7 @@ public interface MutableCollection : kotlin.Collection, kotlin.Mutab public abstract fun clear(): kotlin.Unit public abstract override /*1*/ /*fake_override*/ fun contains(/*0*/ o: E): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun containsAll(/*0*/ c: kotlin.Collection): kotlin.Boolean + public abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public abstract override /*2*/ fun iterator(): kotlin.MutableIterator public abstract fun remove(/*0*/ o: E): kotlin.Boolean public abstract fun removeAll(/*0*/ c: kotlin.Collection): kotlin.Boolean @@ -977,8 +973,6 @@ public interface MutableIterator : kotlin.Iterator { } public interface MutableList : kotlin.List, kotlin.MutableCollection { - public abstract override /*2*/ /*fake_override*/ val isEmpty: kotlin.Boolean - public abstract override /*2*/ /*fake_override*/ fun (): kotlin.Boolean public abstract override /*2*/ /*fake_override*/ val size: kotlin.Int public abstract override /*2*/ /*fake_override*/ fun (): kotlin.Int public abstract override /*1*/ fun add(/*0*/ e: E): kotlin.Boolean @@ -990,6 +984,7 @@ public interface MutableList : kotlin.List, kotlin.MutableCollection public abstract override /*2*/ /*fake_override*/ fun containsAll(/*0*/ c: kotlin.Collection): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): E public abstract override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public abstract override /*2*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public abstract override /*2*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public abstract override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public abstract override /*1*/ fun listIterator(): kotlin.MutableListIterator @@ -1017,8 +1012,6 @@ public interface MutableListIterator : kotlin.ListIterator, kotlin.M public interface MutableMap : kotlin.Map { public abstract override /*1*/ val entries: kotlin.MutableSet> public abstract override /*1*/ fun (): kotlin.MutableSet> - public abstract override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean - public abstract override /*1*/ /*fake_override*/ fun (): kotlin.Boolean public abstract override /*1*/ val keys: kotlin.MutableSet public abstract override /*1*/ fun (): kotlin.MutableSet public abstract override /*1*/ /*fake_override*/ val size: kotlin.Int @@ -1029,6 +1022,7 @@ public interface MutableMap : kotlin.Map { public abstract override /*1*/ /*fake_override*/ fun containsKey(/*0*/ key: K): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun containsValue(/*0*/ value: V): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun get(/*0*/ key: K): V? + public abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public abstract fun put(/*0*/ key: K, /*1*/ value: V): V? public abstract fun putAll(/*0*/ m: kotlin.Map): kotlin.Unit public abstract fun remove(/*0*/ key: K): V? @@ -1043,8 +1037,6 @@ public interface MutableMap : kotlin.Map { } public interface MutableSet : kotlin.Set, kotlin.MutableCollection { - public abstract override /*2*/ /*fake_override*/ val isEmpty: kotlin.Boolean - public abstract override /*2*/ /*fake_override*/ fun (): kotlin.Boolean public abstract override /*2*/ /*fake_override*/ val size: kotlin.Int public abstract override /*2*/ /*fake_override*/ fun (): kotlin.Int public abstract override /*1*/ fun add(/*0*/ e: E): kotlin.Boolean @@ -1052,6 +1044,7 @@ public interface MutableSet : kotlin.Set, kotlin.MutableCollection): kotlin.Boolean + public abstract override /*2*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public abstract override /*2*/ fun iterator(): kotlin.MutableIterator public abstract override /*1*/ fun remove(/*0*/ o: E): kotlin.Boolean public abstract override /*1*/ fun removeAll(/*0*/ c: kotlin.Collection): kotlin.Boolean @@ -1114,12 +1107,11 @@ public interface Range> { } public interface Set : kotlin.Collection { - public abstract override /*1*/ val isEmpty: kotlin.Boolean - public abstract override /*1*/ fun (): kotlin.Boolean public abstract override /*1*/ val size: kotlin.Int public abstract override /*1*/ fun (): kotlin.Int public abstract override /*1*/ fun contains(/*0*/ o: @kotlin.UnsafeVariance() E): kotlin.Boolean public abstract override /*1*/ fun containsAll(/*0*/ c: kotlin.Collection<@kotlin.UnsafeVariance() E>): kotlin.Boolean + public abstract override /*1*/ fun isEmpty(): kotlin.Boolean public abstract override /*1*/ fun iterator(): kotlin.Iterator } diff --git a/compiler/testData/codegen/box/bridges/strListContains.kt b/compiler/testData/codegen/box/bridges/strListContains.kt index 9b6fbd2e06f..98887937e96 100644 --- a/compiler/testData/codegen/box/bridges/strListContains.kt +++ b/compiler/testData/codegen/box/bridges/strListContains.kt @@ -2,7 +2,7 @@ class StrList : List { override val size: Int get() = throw UnsupportedOperationException() - override val isEmpty: Boolean get() { + override fun isEmpty(): Boolean { throw UnsupportedOperationException() } diff --git a/compiler/testData/codegen/box/builtinStubMethods/Collection.kt b/compiler/testData/codegen/box/builtinStubMethods/Collection.kt index bc7e2994964..44f9b031a08 100644 --- a/compiler/testData/codegen/box/builtinStubMethods/Collection.kt +++ b/compiler/testData/codegen/box/builtinStubMethods/Collection.kt @@ -1,6 +1,6 @@ class MyCollection: Collection { override val size: Int get() = 0 - override val isEmpty: Boolean get() = true + override fun isEmpty(): Boolean = true override fun contains(o: T): Boolean = false override fun iterator(): Iterator = throw UnsupportedOperationException() override fun containsAll(c: Collection): Boolean = false diff --git a/compiler/testData/codegen/box/builtinStubMethods/List.kt b/compiler/testData/codegen/box/builtinStubMethods/List.kt index 3ea416f1630..6f441a95162 100644 --- a/compiler/testData/codegen/box/builtinStubMethods/List.kt +++ b/compiler/testData/codegen/box/builtinStubMethods/List.kt @@ -1,6 +1,6 @@ class MyList: List { override val size: Int get() = 0 - override val isEmpty: Boolean get() = true + override fun isEmpty(): Boolean = true override fun contains(o: T): Boolean = false override fun iterator(): Iterator = throw Error() override fun containsAll(c: Collection): Boolean = false diff --git a/compiler/testData/codegen/box/builtinStubMethods/ListWithAllImplementations.kt b/compiler/testData/codegen/box/builtinStubMethods/ListWithAllImplementations.kt index 3243cf6f4cd..981fff32636 100644 --- a/compiler/testData/codegen/box/builtinStubMethods/ListWithAllImplementations.kt +++ b/compiler/testData/codegen/box/builtinStubMethods/ListWithAllImplementations.kt @@ -1,6 +1,6 @@ class MyList(val v: T): List { override val size: Int get() = 0 - override val isEmpty: Boolean get() = true + override fun isEmpty(): Boolean = true override fun contains(o: T): Boolean = false override fun iterator(): Iterator = throw Error() override fun containsAll(c: Collection): Boolean = false diff --git a/compiler/testData/codegen/box/builtinStubMethods/ListWithAllInheritedImplementations.kt b/compiler/testData/codegen/box/builtinStubMethods/ListWithAllInheritedImplementations.kt index e119905d3a1..08c89f6da3c 100644 --- a/compiler/testData/codegen/box/builtinStubMethods/ListWithAllInheritedImplementations.kt +++ b/compiler/testData/codegen/box/builtinStubMethods/ListWithAllInheritedImplementations.kt @@ -13,7 +13,7 @@ open class Super(val v: T) { class MyList(v: T): Super(v), List { override val size: Int get() = 0 - override val isEmpty: Boolean get() = true + override fun isEmpty(): Boolean = true override fun contains(o: T): Boolean = false override fun iterator(): Iterator = throw Error() override fun containsAll(c: Collection): Boolean = false diff --git a/compiler/testData/codegen/box/builtinStubMethods/Map.kt b/compiler/testData/codegen/box/builtinStubMethods/Map.kt index 4a6a7eb54e3..fe61ab7f14a 100644 --- a/compiler/testData/codegen/box/builtinStubMethods/Map.kt +++ b/compiler/testData/codegen/box/builtinStubMethods/Map.kt @@ -1,6 +1,6 @@ class MyMap: Map { override val size: Int get() = 0 - override val isEmpty: Boolean get() = true + override fun isEmpty(): Boolean = true override fun containsKey(key: K): Boolean = false override fun containsValue(value: V): Boolean = false override fun get(key: K): V? = null diff --git a/compiler/testData/codegen/box/builtinStubMethods/MapWithAllImplementations.kt b/compiler/testData/codegen/box/builtinStubMethods/MapWithAllImplementations.kt index 6f6dfb95114..410419b02da 100644 --- a/compiler/testData/codegen/box/builtinStubMethods/MapWithAllImplementations.kt +++ b/compiler/testData/codegen/box/builtinStubMethods/MapWithAllImplementations.kt @@ -1,6 +1,6 @@ class MyMap: Map { override val size: Int get() = 0 - override val isEmpty: Boolean get() = true + override fun isEmpty(): Boolean = true override fun containsKey(key: K): Boolean = false override fun containsValue(value: V): Boolean = false override fun get(key: K): V? = null diff --git a/compiler/testData/codegen/box/builtinStubMethods/SubstitutedList.kt b/compiler/testData/codegen/box/builtinStubMethods/SubstitutedList.kt index 54a44e7380a..473aea37f55 100644 --- a/compiler/testData/codegen/box/builtinStubMethods/SubstitutedList.kt +++ b/compiler/testData/codegen/box/builtinStubMethods/SubstitutedList.kt @@ -1,6 +1,6 @@ class MyList: List { override val size: Int get() = 0 - override val isEmpty: Boolean get() = true + override fun isEmpty(): Boolean = true override fun contains(o: String): Boolean = false override fun iterator(): Iterator = throw Error() override fun containsAll(c: Collection): Boolean = false diff --git a/compiler/testData/codegen/box/builtinStubMethods/implementationInTrait.kt b/compiler/testData/codegen/box/builtinStubMethods/implementationInTrait.kt index bf86c082492..65eaff7f18b 100644 --- a/compiler/testData/codegen/box/builtinStubMethods/implementationInTrait.kt +++ b/compiler/testData/codegen/box/builtinStubMethods/implementationInTrait.kt @@ -4,7 +4,7 @@ interface Addable { class C : Addable, List { override val size: Int get() = null!! - override val isEmpty: Boolean get() = null!! + override fun isEmpty(): Boolean = null!! override fun contains(o: String): Boolean = null!! override fun iterator(): Iterator = null!! override fun containsAll(c: Collection): Boolean = null!! diff --git a/compiler/testData/codegen/box/builtinStubMethods/inheritedImplementations.kt b/compiler/testData/codegen/box/builtinStubMethods/inheritedImplementations.kt index b61db7301d3..306040c15e5 100644 --- a/compiler/testData/codegen/box/builtinStubMethods/inheritedImplementations.kt +++ b/compiler/testData/codegen/box/builtinStubMethods/inheritedImplementations.kt @@ -6,7 +6,7 @@ open class SetStringImpl { class S : Set, SetStringImpl() { override val size: Int get() = 0 - override val isEmpty: Boolean get() = true + override fun isEmpty(): Boolean = true override fun contains(o: String): Boolean = false override fun iterator(): Iterator = null!! override fun containsAll(c: Collection) = false diff --git a/compiler/testData/codegen/box/builtinStubMethods/manyTypeParametersWithUpperBounds.kt b/compiler/testData/codegen/box/builtinStubMethods/manyTypeParametersWithUpperBounds.kt index 2712c9e9ca8..244266cc0b6 100644 --- a/compiler/testData/codegen/box/builtinStubMethods/manyTypeParametersWithUpperBounds.kt +++ b/compiler/testData/codegen/box/builtinStubMethods/manyTypeParametersWithUpperBounds.kt @@ -2,10 +2,10 @@ import java.util.Collections class A : Set { override val size: Int get() = 0 - override val isEmpty: Boolean get() = true + override fun isEmpty(): Boolean = true override fun contains(o: W): Boolean = false override fun iterator(): Iterator = Collections.emptySet().iterator() - override fun containsAll(c: Collection): Boolean = c.isEmpty + override fun containsAll(c: Collection): Boolean = c.isEmpty() } fun expectUoe(block: () -> Any) { diff --git a/compiler/testData/codegen/box/builtinStubMethods/nonTrivialSubstitution.kt b/compiler/testData/codegen/box/builtinStubMethods/nonTrivialSubstitution.kt index edf51eafcd0..b77fd967035 100644 --- a/compiler/testData/codegen/box/builtinStubMethods/nonTrivialSubstitution.kt +++ b/compiler/testData/codegen/box/builtinStubMethods/nonTrivialSubstitution.kt @@ -3,7 +3,7 @@ import java.util.ArrayList class MyCollection : Collection>> { override fun iterator() = null!! override val size: Int get() = null!! - override val isEmpty: Boolean get() = null!! + override fun isEmpty(): Boolean = null!! override fun contains(o: List>): Boolean = null!! override fun containsAll(c: Collection>>): Boolean = null!! } diff --git a/compiler/testData/codegen/box/builtinsProperties/bridges.kt b/compiler/testData/codegen/box/builtinsProperties/bridges.kt index 6f0a1c8ba5a..7c42be8ddcd 100644 --- a/compiler/testData/codegen/box/builtinsProperties/bridges.kt +++ b/compiler/testData/codegen/box/builtinsProperties/bridges.kt @@ -5,7 +5,7 @@ interface A0 { } class B0 : Collection, A0 { - override val isEmpty: Boolean get() = throw UnsupportedOperationException() + override fun isEmpty() = throw UnsupportedOperationException() override fun contains(o: String) = throw UnsupportedOperationException() override fun iterator() = throw UnsupportedOperationException() override fun containsAll(c: Collection) = throw UnsupportedOperationException() @@ -18,7 +18,7 @@ open class A1 { } class B1 : Collection, A1() { - override val isEmpty: Boolean get() = throw UnsupportedOperationException() + override fun isEmpty() = throw UnsupportedOperationException() override fun contains(o: String) = throw UnsupportedOperationException() override fun iterator() = throw UnsupportedOperationException() override fun containsAll(c: Collection) = throw UnsupportedOperationException() @@ -43,7 +43,7 @@ interface I4 { } class B4 : Collection, I4 { - override val isEmpty: Boolean get() = throw UnsupportedOperationException() + override fun isEmpty() = throw UnsupportedOperationException() override fun contains(o: String) = throw UnsupportedOperationException() override fun iterator() = throw UnsupportedOperationException() override fun containsAll(c: Collection) = throw UnsupportedOperationException() @@ -56,7 +56,7 @@ interface I5 : Collection { } class B5 : I5 { - override val isEmpty: Boolean get() = throw UnsupportedOperationException() + override fun isEmpty() = throw UnsupportedOperationException() override fun contains(o: String) = throw UnsupportedOperationException() override fun iterator() = throw UnsupportedOperationException() override fun containsAll(c: Collection) = throw UnsupportedOperationException() diff --git a/compiler/testData/codegen/box/builtinsProperties/collectionImpl.kt b/compiler/testData/codegen/box/builtinsProperties/collectionImpl.kt index d836700317e..6ad55fb99bf 100644 --- a/compiler/testData/codegen/box/builtinsProperties/collectionImpl.kt +++ b/compiler/testData/codegen/box/builtinsProperties/collectionImpl.kt @@ -2,7 +2,7 @@ class A1 : MutableCollection { override val size: Int get() = 56 - override val isEmpty: Boolean get() { + override fun isEmpty(): Boolean { throw UnsupportedOperationException() } diff --git a/compiler/testData/codegen/box/builtinsProperties/maps.kt b/compiler/testData/codegen/box/builtinsProperties/maps.kt index 4e5876465f8..d3dedeef878 100644 --- a/compiler/testData/codegen/box/builtinsProperties/maps.kt +++ b/compiler/testData/codegen/box/builtinsProperties/maps.kt @@ -1,7 +1,7 @@ class A : Map { override val size: Int get() = 56 - override val isEmpty: Boolean get() { + override fun isEmpty(): Boolean { throw UnsupportedOperationException() } diff --git a/compiler/testData/codegen/boxWithJava/builtinStubMethods/substitutedList/substitutedList.kt b/compiler/testData/codegen/boxWithJava/builtinStubMethods/substitutedList/substitutedList.kt index 585a3ed30b6..f90a0b07117 100644 --- a/compiler/testData/codegen/boxWithJava/builtinStubMethods/substitutedList/substitutedList.kt +++ b/compiler/testData/codegen/boxWithJava/builtinStubMethods/substitutedList/substitutedList.kt @@ -1,6 +1,6 @@ abstract class C : Test.A, List { override val size: Int get() = null!! - override val isEmpty: Boolean get() = null!! + override fun isEmpty(): Boolean = null!! override fun contains(o: String): Boolean = null!! override fun iterator(): Iterator = null!! override fun containsAll(c: Collection): Boolean = null!! diff --git a/compiler/testData/codegen/boxWithJava/collections/mutableList/mutableList.kt b/compiler/testData/codegen/boxWithJava/collections/mutableList/mutableList.kt index b938eb3bc83..edc53e67246 100644 --- a/compiler/testData/codegen/boxWithJava/collections/mutableList/mutableList.kt +++ b/compiler/testData/codegen/boxWithJava/collections/mutableList/mutableList.kt @@ -58,7 +58,7 @@ open class KList : MutableList { override val size: Int get() = throw UnsupportedOperationException() - override val isEmpty: Boolean get() { + override fun isEmpty(): Boolean { throw UnsupportedOperationException() } diff --git a/compiler/testData/codegen/boxWithJava/collections/removeAtInt/removeAtInt.kt b/compiler/testData/codegen/boxWithJava/collections/removeAtInt/removeAtInt.kt index a4becb5b04a..cd369e9693b 100644 --- a/compiler/testData/codegen/boxWithJava/collections/removeAtInt/removeAtInt.kt +++ b/compiler/testData/codegen/boxWithJava/collections/removeAtInt/removeAtInt.kt @@ -1,8 +1,7 @@ open class A : MutableList { override val size: Int get() = throw UnsupportedOperationException() - override val isEmpty: Boolean - get() = throw UnsupportedOperationException() + override fun isEmpty(): Boolean = throw UnsupportedOperationException() override fun contains(o: Int): Boolean { throw UnsupportedOperationException() diff --git a/compiler/testData/codegen/boxWithJava/collections/strList/strList.kt b/compiler/testData/codegen/boxWithJava/collections/strList/strList.kt index 9f15d939273..7335968364d 100644 --- a/compiler/testData/codegen/boxWithJava/collections/strList/strList.kt +++ b/compiler/testData/codegen/boxWithJava/collections/strList/strList.kt @@ -2,7 +2,7 @@ open class KList : MutableList { override val size: Int get() = throw UnsupportedOperationException() - override val isEmpty: Boolean get() { + override fun isEmpty(): Boolean { throw UnsupportedOperationException() } diff --git a/compiler/testData/compileJavaAgainstKotlin/class/ExtendsAbstractListT.txt b/compiler/testData/compileJavaAgainstKotlin/class/ExtendsAbstractListT.txt index 802b082cbf7..38863b82b0f 100644 --- a/compiler/testData/compileJavaAgainstKotlin/class/ExtendsAbstractListT.txt +++ b/compiler/testData/compileJavaAgainstKotlin/class/ExtendsAbstractListT.txt @@ -6,7 +6,6 @@ public/*package*/ open class ExtendsAbstractListT { public abstract class Mine : java.util.AbstractList { public constructor Mine() - public open /*fake_override*/ val isEmpty: kotlin.Boolean protected/*protected and package*/ final /*fake_override*/ var modCount: kotlin.Int public abstract /*fake_override*/ val size: kotlin.Int public open /*fake_override*/ fun add(/*0*/ T!): kotlin.Boolean @@ -18,6 +17,7 @@ public abstract class Mine : java.util.AbstractList { public open /*fake_override*/ fun containsAll(/*0*/ kotlin.Collection): kotlin.Boolean public abstract /*fake_override*/ fun get(/*0*/ kotlin.Int): T! public open /*fake_override*/ fun indexOf(/*0*/ kotlin.Any?): kotlin.Int + public open /*fake_override*/ fun isEmpty(): kotlin.Boolean public open /*fake_override*/ fun iterator(): kotlin.MutableIterator public open /*fake_override*/ fun lastIndexOf(/*0*/ kotlin.Any?): kotlin.Int public open /*fake_override*/ fun listIterator(): kotlin.MutableListIterator diff --git a/compiler/testData/compileJavaAgainstKotlin/class/ImplementsListString.txt b/compiler/testData/compileJavaAgainstKotlin/class/ImplementsListString.txt index 54457e16c02..bceecb85dff 100644 --- a/compiler/testData/compileJavaAgainstKotlin/class/ImplementsListString.txt +++ b/compiler/testData/compileJavaAgainstKotlin/class/ImplementsListString.txt @@ -2,7 +2,6 @@ package test public abstract class Mine : java.util.List { public constructor Mine() - public abstract /*fake_override*/ val isEmpty: kotlin.Boolean public abstract /*fake_override*/ val size: kotlin.Int public abstract /*fake_override*/ fun add(/*0*/ kotlin.Int, /*1*/ kotlin.String!): kotlin.Unit public abstract /*fake_override*/ fun add(/*0*/ kotlin.String!): kotlin.Boolean @@ -13,6 +12,7 @@ public abstract class Mine : java.util.List { public abstract /*fake_override*/ fun containsAll(/*0*/ kotlin.Collection): kotlin.Boolean public abstract /*fake_override*/ fun get(/*0*/ kotlin.Int): kotlin.String! public abstract /*fake_override*/ fun indexOf(/*0*/ kotlin.Any!): kotlin.Int + public abstract /*fake_override*/ fun isEmpty(): kotlin.Boolean public abstract /*fake_override*/ fun iterator(): kotlin.MutableIterator public abstract /*fake_override*/ fun lastIndexOf(/*0*/ kotlin.Any!): kotlin.Int public abstract /*fake_override*/ fun listIterator(): kotlin.(Mutable)ListIterator! diff --git a/compiler/testData/diagnostics/tests/ValAndFunOverrideCompatibilityClash.txt b/compiler/testData/diagnostics/tests/ValAndFunOverrideCompatibilityClash.txt index c7049e5e453..4d0a77e1bd5 100644 --- a/compiler/testData/diagnostics/tests/ValAndFunOverrideCompatibilityClash.txt +++ b/compiler/testData/diagnostics/tests/ValAndFunOverrideCompatibilityClash.txt @@ -21,7 +21,6 @@ public final class Barr : Bar { public final class Foo1 : java.util.ArrayList { public constructor Foo1() invisible_fake final override /*1*/ /*fake_override*/ var elementData: kotlin.Array<(out) kotlin.Any!>! - public open override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int invisible_fake final override /*1*/ /*fake_override*/ var size: kotlin.Int public open override /*1*/ /*fake_override*/ val size: kotlin.Int @@ -43,6 +42,7 @@ public final class Foo1 : java.util.ArrayList { invisible_fake open override /*1*/ /*fake_override*/ fun grow(/*0*/ p0: kotlin.Int): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator diff --git a/compiler/testData/diagnostics/tests/exposed/typeArgs.txt b/compiler/testData/diagnostics/tests/exposed/typeArgs.txt index 066e604a0b0..7d178c6fb8a 100644 --- a/compiler/testData/diagnostics/tests/exposed/typeArgs.txt +++ b/compiler/testData/diagnostics/tests/exposed/typeArgs.txt @@ -7,7 +7,6 @@ public interface Generic { } public interface His : kotlin.List { - public abstract override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean public abstract override /*1*/ /*fake_override*/ val size: kotlin.Int public abstract override /*1*/ /*fake_override*/ fun contains(/*0*/ o: My): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun containsAll(/*0*/ c: kotlin.Collection): kotlin.Boolean @@ -15,6 +14,7 @@ public interface His : kotlin.List { public abstract override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): My public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public abstract override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun iterator(): kotlin.Iterator public abstract override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public abstract override /*1*/ /*fake_override*/ fun listIterator(): kotlin.ListIterator diff --git a/compiler/testData/diagnostics/tests/j+k/GenericsInSupertypes.txt b/compiler/testData/diagnostics/tests/j+k/GenericsInSupertypes.txt index e2f36687cc7..aa8f32df14a 100644 --- a/compiler/testData/diagnostics/tests/j+k/GenericsInSupertypes.txt +++ b/compiler/testData/diagnostics/tests/j+k/GenericsInSupertypes.txt @@ -3,7 +3,6 @@ package public abstract class AL : java.util.ArrayList { public constructor AL() invisible_fake final override /*1*/ /*fake_override*/ var elementData: kotlin.Array<(out) kotlin.Any!>! - public open override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int invisible_fake final override /*1*/ /*fake_override*/ var size: kotlin.Int public open override /*1*/ /*fake_override*/ val size: kotlin.Int @@ -25,6 +24,7 @@ public abstract class AL : java.util.ArrayList { invisible_fake open override /*1*/ /*fake_override*/ fun grow(/*0*/ p0: kotlin.Int): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator diff --git a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/contains.txt b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/contains.txt index adb122d2c34..54b0a64877d 100644 --- a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/contains.txt +++ b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/contains.txt @@ -4,7 +4,6 @@ public fun foo(/*0*/ a: A, /*1*/ b: B, /*2*/ ic: IC, /*3*/ ka: KA public abstract class A : kotlin.MutableCollection { public constructor A() - public abstract override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean public abstract override /*1*/ /*fake_override*/ val size: kotlin.Int public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ e: T!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun addAll(/*0*/ c: kotlin.Collection): kotlin.Boolean @@ -13,6 +12,7 @@ public abstract class A : kotlin.MutableCollection { public abstract override /*1*/ /*fake_override*/ fun containsAll(/*0*/ c: kotlin.Collection): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public abstract override /*1*/ /*fake_override*/ fun remove(/*0*/ o: T!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun removeAll(/*0*/ c: kotlin.Collection): kotlin.Boolean @@ -22,7 +22,6 @@ public abstract class A : kotlin.MutableCollection { public abstract class B : kotlin.MutableCollection { public constructor B() - public abstract override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean public abstract override /*1*/ /*fake_override*/ val size: kotlin.Int public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ e: kotlin.String!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun addAll(/*0*/ c: kotlin.Collection): kotlin.Boolean @@ -31,6 +30,7 @@ public abstract class B : kotlin.MutableCollection { public abstract override /*1*/ /*fake_override*/ fun containsAll(/*0*/ c: kotlin.Collection): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public abstract override /*1*/ /*fake_override*/ fun remove(/*0*/ o: kotlin.String!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun removeAll(/*0*/ c: kotlin.Collection): kotlin.Boolean @@ -39,7 +39,6 @@ public abstract class B : kotlin.MutableCollection { } public interface IC : kotlin.MutableCollection { - public abstract override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean public abstract override /*1*/ /*fake_override*/ val size: kotlin.Int public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ e: kotlin.String!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun addAll(/*0*/ c: kotlin.Collection): kotlin.Boolean @@ -48,6 +47,7 @@ public interface IC : kotlin.MutableCollection { public abstract override /*1*/ /*fake_override*/ fun containsAll(/*0*/ c: kotlin.Collection): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public abstract override /*1*/ /*fake_override*/ fun remove(/*0*/ o: kotlin.String!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun removeAll(/*0*/ c: kotlin.Collection): kotlin.Boolean @@ -57,7 +57,6 @@ public interface IC : kotlin.MutableCollection { public abstract class KA : java.util.AbstractList { public constructor KA() - public open override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int public abstract override /*1*/ /*fake_override*/ val size: kotlin.Int public open override /*1*/ /*fake_override*/ fun add(/*0*/ e: T!): kotlin.Boolean @@ -71,6 +70,7 @@ public abstract class KA : java.util.AbstractList { public abstract override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): T! public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator @@ -91,7 +91,6 @@ public abstract class KA : java.util.AbstractList { public abstract class KB : java.util.AbstractList, IC { public constructor KB() - public open override /*2*/ /*fake_override*/ val isEmpty: kotlin.Boolean protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int public abstract override /*2*/ /*fake_override*/ val size: kotlin.Int public open override /*1*/ /*fake_override*/ fun add(/*0*/ index: kotlin.Int, /*1*/ element: kotlin.String!): kotlin.Unit @@ -105,6 +104,7 @@ public abstract class KB : java.util.AbstractList, IC { public abstract override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): kotlin.String! public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*2*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator diff --git a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/containsAll.txt b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/containsAll.txt index 4fb8ab879ce..6b98d5e2726 100644 --- a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/containsAll.txt +++ b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/containsAll.txt @@ -4,7 +4,6 @@ public fun foo(/*0*/ a: A, /*1*/ b: B, /*2*/ ic: IC, /*3*/ ka: KA public abstract class A : kotlin.MutableCollection { public constructor A() - public abstract override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean public abstract override /*1*/ /*fake_override*/ val size: kotlin.Int public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ e: T!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun addAll(/*0*/ c: kotlin.Collection): kotlin.Boolean @@ -13,6 +12,7 @@ public abstract class A : kotlin.MutableCollection { public open override /*1*/ fun containsAll(/*0*/ c: kotlin.Collection): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public abstract override /*1*/ /*fake_override*/ fun remove(/*0*/ o: T!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun removeAll(/*0*/ c: kotlin.Collection): kotlin.Boolean @@ -22,7 +22,6 @@ public abstract class A : kotlin.MutableCollection { public abstract class B : kotlin.MutableCollection { public constructor B() - public abstract override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean public abstract override /*1*/ /*fake_override*/ val size: kotlin.Int public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ e: kotlin.String!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun addAll(/*0*/ c: kotlin.Collection): kotlin.Boolean @@ -31,6 +30,7 @@ public abstract class B : kotlin.MutableCollection { public open override /*1*/ fun containsAll(/*0*/ c: kotlin.Collection): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public abstract override /*1*/ /*fake_override*/ fun remove(/*0*/ o: kotlin.String!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun removeAll(/*0*/ c: kotlin.Collection): kotlin.Boolean @@ -39,7 +39,6 @@ public abstract class B : kotlin.MutableCollection { } public interface IC : kotlin.MutableCollection { - public abstract override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean public abstract override /*1*/ /*fake_override*/ val size: kotlin.Int public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ e: kotlin.String!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun addAll(/*0*/ c: kotlin.Collection): kotlin.Boolean @@ -48,6 +47,7 @@ public interface IC : kotlin.MutableCollection { public abstract override /*1*/ fun containsAll(/*0*/ c: kotlin.Collection): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public abstract override /*1*/ /*fake_override*/ fun remove(/*0*/ o: kotlin.String!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun removeAll(/*0*/ c: kotlin.Collection): kotlin.Boolean @@ -57,7 +57,6 @@ public interface IC : kotlin.MutableCollection { public abstract class KA : java.util.AbstractList { public constructor KA() - public open override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int public abstract override /*1*/ /*fake_override*/ val size: kotlin.Int public open override /*1*/ /*fake_override*/ fun add(/*0*/ e: T!): kotlin.Boolean @@ -71,6 +70,7 @@ public abstract class KA : java.util.AbstractList { public abstract override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): T! public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator @@ -91,7 +91,6 @@ public abstract class KA : java.util.AbstractList { public abstract class KB : java.util.AbstractList, IC { public constructor KB() - public open override /*2*/ /*fake_override*/ val isEmpty: kotlin.Boolean protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int public abstract override /*2*/ /*fake_override*/ val size: kotlin.Int public open override /*1*/ /*fake_override*/ fun add(/*0*/ index: kotlin.Int, /*1*/ element: kotlin.String!): kotlin.Unit @@ -105,6 +104,7 @@ public abstract class KB : java.util.AbstractList, IC { public abstract override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): kotlin.String! public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*2*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator diff --git a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/containsAndOverload.txt b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/containsAndOverload.txt index 026c1b0996d..f6120411d1f 100644 --- a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/containsAndOverload.txt +++ b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/containsAndOverload.txt @@ -4,7 +4,6 @@ public fun foo(/*0*/ a: A, /*1*/ ka: KA): kotlin.Unit public abstract class A : kotlin.MutableCollection { public constructor A() - public abstract override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean public abstract override /*1*/ /*fake_override*/ val size: kotlin.Int public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ e: kotlin.String!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun addAll(/*0*/ c: kotlin.Collection): kotlin.Boolean @@ -13,6 +12,7 @@ public abstract class A : kotlin.MutableCollection { public abstract override /*1*/ /*fake_override*/ fun containsAll(/*0*/ c: kotlin.Collection): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public abstract override /*1*/ /*fake_override*/ fun remove(/*0*/ o: kotlin.String!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun removeAll(/*0*/ c: kotlin.Collection): kotlin.Boolean @@ -22,7 +22,6 @@ public abstract class A : kotlin.MutableCollection { public abstract class KA : A { public constructor KA() - public abstract override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean public abstract override /*1*/ /*fake_override*/ val size: kotlin.Int public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ e: kotlin.String!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun addAll(/*0*/ c: kotlin.Collection): kotlin.Boolean @@ -31,6 +30,7 @@ public abstract class KA : A { public abstract override /*1*/ /*fake_override*/ fun containsAll(/*0*/ c: kotlin.Collection): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public abstract override /*1*/ /*fake_override*/ fun remove(/*0*/ o: kotlin.String!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun removeAll(/*0*/ c: kotlin.Collection): kotlin.Boolean diff --git a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/mapGetOverride.txt b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/mapGetOverride.txt index 071d63cc16f..11de21c9fff 100644 --- a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/mapGetOverride.txt +++ b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/mapGetOverride.txt @@ -5,7 +5,6 @@ public fun foo(/*0*/ m: MyMap): kotlin.Unit public abstract class MyMap : java.util.AbstractMap { public constructor MyMap() public abstract override /*1*/ /*fake_override*/ val entries: kotlin.MutableSet> - public open override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean invisible_fake final override /*1*/ /*fake_override*/ var keySet: kotlin.(Mutable)Set! public open override /*1*/ /*fake_override*/ val keys: kotlin.MutableSet public open override /*1*/ /*fake_override*/ val size: kotlin.Int @@ -18,6 +17,7 @@ public abstract class MyMap : java.util.AbstractMap): kotlin.Unit public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: kotlin.Double!): kotlin.CharSequence? diff --git a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/overridesBuiltinNoMagic.txt b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/overridesBuiltinNoMagic.txt index 925a64a1158..479877f61b9 100644 --- a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/overridesBuiltinNoMagic.txt +++ b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/overridesBuiltinNoMagic.txt @@ -4,7 +4,6 @@ public fun main(): kotlin.Unit public open class X : kotlin.MutableList { public constructor X() - public open override /*1*/ val isEmpty: kotlin.Boolean public open override /*1*/ val size: kotlin.Int @java.lang.Override() public open override /*1*/ fun add(/*0*/ index: kotlin.Int, /*1*/ element: kotlin.String!): kotlin.Unit @java.lang.Override() public open override /*1*/ fun add(/*0*/ e: kotlin.String!): kotlin.Boolean @@ -17,6 +16,7 @@ public open class X : kotlin.MutableList { @java.lang.Override() public open override /*1*/ fun get(/*0*/ index: kotlin.Int): kotlin.String! public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @java.lang.Override() public open override /*1*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + @java.lang.Override() public open override /*1*/ fun isEmpty(): kotlin.Boolean @org.jetbrains.annotations.NotNull() @java.lang.Override() public open override /*1*/ fun iterator(): kotlin.MutableIterator @java.lang.Override() public open override /*1*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int @org.jetbrains.annotations.NotNull() @java.lang.Override() public open override /*1*/ fun listIterator(): kotlin.MutableListIterator @@ -34,7 +34,6 @@ public open class X : kotlin.MutableList { public final class Y : X { public constructor Y() - public open override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean public open override /*1*/ /*fake_override*/ val size: kotlin.Int @java.lang.Override() public open override /*1*/ /*fake_override*/ fun add(/*0*/ index: kotlin.Int, /*1*/ element: kotlin.String!): kotlin.Unit @java.lang.Override() public open override /*1*/ /*fake_override*/ fun add(/*0*/ e: kotlin.String!): kotlin.Boolean @@ -47,6 +46,7 @@ public final class Y : X { @java.lang.Override() public open override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): kotlin.String! public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int @java.lang.Override() public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + @java.lang.Override() public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean @org.jetbrains.annotations.NotNull() @java.lang.Override() public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator @java.lang.Override() public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int @org.jetbrains.annotations.NotNull() @java.lang.Override() public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator diff --git a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/removeAt.txt b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/removeAt.txt index ade32a4dc3c..059485f8b47 100644 --- a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/removeAt.txt +++ b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/removeAt.txt @@ -4,7 +4,6 @@ public fun main(/*0*/ a: A, /*1*/ b: B, /*2*/ c: j public abstract class A : B { public constructor A() - public open override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int public abstract override /*1*/ /*fake_override*/ val size: kotlin.Int public open override /*1*/ /*fake_override*/ fun add(/*0*/ e: F!): kotlin.Boolean @@ -18,6 +17,7 @@ public abstract class A : B { public abstract override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): F! public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator @@ -43,7 +43,6 @@ public abstract class A : B { public abstract class B : kotlin.MutableList, java.util.AbstractList { public constructor B() - public open override /*2*/ /*fake_override*/ val isEmpty: kotlin.Boolean protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int public abstract override /*2*/ /*fake_override*/ val size: kotlin.Int public open override /*2*/ /*fake_override*/ fun add(/*0*/ e: T!): kotlin.Boolean @@ -57,6 +56,7 @@ public abstract class B : kotlin.MutableList, java.util.AbstractList public abstract override /*2*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): T! public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*2*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*2*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public open override /*2*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*2*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator diff --git a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/removeAtInt.txt b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/removeAtInt.txt index ca49f08410a..01c7674c1e8 100644 --- a/compiler/testData/diagnostics/tests/j+k/collectionOverrides/removeAtInt.txt +++ b/compiler/testData/diagnostics/tests/j+k/collectionOverrides/removeAtInt.txt @@ -4,7 +4,6 @@ public fun main(/*0*/ a: A, /*1*/ b: B, /*2*/ c: java.util.ArrayList public abstract class A : B { public constructor A() - public open override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int public abstract override /*1*/ /*fake_override*/ val size: kotlin.Int public open override /*1*/ /*fake_override*/ fun add(/*0*/ index: kotlin.Int, /*1*/ element: kotlin.Int!): kotlin.Unit @@ -18,6 +17,7 @@ public abstract class A : B { public abstract override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): kotlin.Int! public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator @@ -43,7 +43,6 @@ public abstract class A : B { public abstract class B : kotlin.MutableList, java.util.AbstractList { public constructor B() - public open override /*2*/ /*fake_override*/ val isEmpty: kotlin.Boolean protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int public abstract override /*2*/ /*fake_override*/ val size: kotlin.Int public open override /*2*/ /*fake_override*/ fun add(/*0*/ index: kotlin.Int, /*1*/ element: kotlin.Int!): kotlin.Unit @@ -57,6 +56,7 @@ public abstract class B : kotlin.MutableList, java.util.AbstractList public abstract override /*2*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): kotlin.Int! public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*2*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*2*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public open override /*2*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*2*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator diff --git a/compiler/testData/diagnostics/tests/j+k/finalCollectionSize.txt b/compiler/testData/diagnostics/tests/j+k/finalCollectionSize.txt index a8be270651b..5da5368e983 100644 --- a/compiler/testData/diagnostics/tests/j+k/finalCollectionSize.txt +++ b/compiler/testData/diagnostics/tests/j+k/finalCollectionSize.txt @@ -3,7 +3,6 @@ package public abstract class A : java.util.ArrayList { public constructor A() invisible_fake final override /*1*/ /*fake_override*/ var elementData: kotlin.Array<(out) kotlin.Any!>! - public open override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int public final override /*1*/ val size: kotlin.Int invisible_fake final override /*1*/ /*fake_override*/ var size: kotlin.Int @@ -25,6 +24,7 @@ public abstract class A : java.util.ArrayList { invisible_fake open override /*1*/ /*fake_override*/ fun grow(/*0*/ p0: kotlin.Int): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator @@ -57,7 +57,6 @@ public abstract class A : java.util.ArrayList { public final class B : A { public constructor B() invisible_fake final override /*1*/ /*fake_override*/ var elementData: kotlin.Array<(out) kotlin.Any!>! - public open override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int public open override /*1*/ val size: kotlin.Int = 1 invisible_fake final override /*1*/ /*fake_override*/ var size: kotlin.Int @@ -79,6 +78,7 @@ public final class B : A { invisible_fake open override /*1*/ /*fake_override*/ fun grow(/*0*/ p0: kotlin.Int): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator diff --git a/compiler/testData/diagnostics/tests/j+k/specialBridges.txt b/compiler/testData/diagnostics/tests/j+k/specialBridges.txt index 6053db8a26e..3fefbeb0a6e 100644 --- a/compiler/testData/diagnostics/tests/j+k/specialBridges.txt +++ b/compiler/testData/diagnostics/tests/j+k/specialBridges.txt @@ -3,7 +3,6 @@ package public final class B2 : java.util.ArrayList, I2 { public constructor B2() invisible_fake final override /*1*/ /*fake_override*/ var elementData: kotlin.Array<(out) kotlin.Any!>! - public open override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int invisible_fake final override /*1*/ /*fake_override*/ var size: kotlin.Int public open override /*2*/ /*fake_override*/ val size: kotlin.Int @@ -25,6 +24,7 @@ public final class B2 : java.util.ArrayList, I2 { invisible_fake open override /*1*/ /*fake_override*/ fun grow(/*0*/ p0: kotlin.Int): kotlin.Unit public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator diff --git a/compiler/testData/diagnostics/tests/library/Collections.kt b/compiler/testData/diagnostics/tests/library/Collections.kt index c861322ee7c..22232a56a10 100644 --- a/compiler/testData/diagnostics/tests/library/Collections.kt +++ b/compiler/testData/diagnostics/tests/library/Collections.kt @@ -2,7 +2,7 @@ package collections fun testCollection(c: Collection, t: T) { c.size - c.isEmpty + c.isEmpty() c.contains(1) val iterator: Iterator = c.iterator() c.containsAll(c) @@ -18,7 +18,7 @@ fun testCollection(c: Collection, t: T) { } fun testMutableCollection(c: MutableCollection, t: T) { c.size - c.isEmpty + c.isEmpty() c.contains(1) val iterator: Iterator = c.iterator() c.containsAll(c) @@ -60,7 +60,7 @@ fun testMutableList(l: MutableList, t: T) { fun testSet(s: Set, t: T) { s.size - s.isEmpty + s.isEmpty() s.contains(1) val iterator: Iterator = s.iterator() s.containsAll(s) @@ -76,7 +76,7 @@ fun testSet(s: Set, t: T) { } fun testMutableSet(s: MutableSet, t: T) { s.size - s.isEmpty + s.isEmpty() s.contains(1) val iterator: Iterator = s.iterator() s.containsAll(s) diff --git a/compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/listSuperType.txt b/compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/listSuperType.txt index 9992c618ac8..8881c6dcdcf 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/listSuperType.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/genericVarianceViolation/listSuperType.txt @@ -12,7 +12,6 @@ public open class A { public abstract class B : kotlin.MutableList { public constructor B() - public abstract override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean public abstract override /*1*/ /*fake_override*/ val size: kotlin.Int public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ index: kotlin.Int, /*1*/ element: kotlin.String): kotlin.Unit public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ e: kotlin.String): kotlin.Boolean @@ -25,6 +24,7 @@ public abstract class B : kotlin.MutableList { public abstract override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): kotlin.String public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public abstract override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public abstract override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public abstract override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator diff --git a/compiler/testData/diagnostics/tests/platformTypes/methodCall/multipleExactBoundsNullable.txt b/compiler/testData/diagnostics/tests/platformTypes/methodCall/multipleExactBoundsNullable.txt index 055e25f3f55..facb5293d74 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/methodCall/multipleExactBoundsNullable.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/methodCall/multipleExactBoundsNullable.txt @@ -5,7 +5,6 @@ public fun foo(/*0*/ delegateResolver: ResolverForProject : java.util.AbstractMap { public/*package*/ constructor MyMap() public open override /*1*/ val entries: kotlin.MutableSet> - public open override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean invisible_fake final override /*1*/ /*fake_override*/ var keySet: kotlin.(Mutable)Set! public open override /*1*/ /*fake_override*/ val keys: kotlin.MutableSet public open override /*1*/ /*fake_override*/ val size: kotlin.Int @@ -18,6 +17,7 @@ public/*package*/ open class MyMap public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun get(/*0*/ key: K!): V? public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun put(/*0*/ key: K!, /*1*/ value: V!): V? public open override /*1*/ /*fake_override*/ fun putAll(/*0*/ m: kotlin.Map): kotlin.Unit public open override /*1*/ /*fake_override*/ fun remove(/*0*/ key: K!): V? diff --git a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/delegation.txt b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/delegation.txt index 59e2e284c68..57cb4958b5b 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/delegation.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/nullabilityWarnings/delegation.txt @@ -2,7 +2,6 @@ package public final class A : kotlin.List { public constructor A() - public open override /*1*/ /*delegation*/ val isEmpty: kotlin.Boolean public open override /*1*/ /*delegation*/ val size: kotlin.Int public open override /*1*/ /*delegation*/ fun contains(/*0*/ o: kotlin.String): kotlin.Boolean public open override /*1*/ /*delegation*/ fun containsAll(/*0*/ c: kotlin.Collection): kotlin.Boolean @@ -10,6 +9,7 @@ public final class A : kotlin.List { public open override /*1*/ /*delegation*/ fun get(/*0*/ index: kotlin.Int): kotlin.String public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*delegation*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*1*/ /*delegation*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*delegation*/ fun iterator(): kotlin.Iterator public open override /*1*/ /*delegation*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*1*/ /*delegation*/ fun listIterator(): kotlin.ListIterator @@ -20,7 +20,6 @@ public final class A : kotlin.List { public final class B : kotlin.List { public constructor B() - public open override /*1*/ /*delegation*/ val isEmpty: kotlin.Boolean public open override /*1*/ /*delegation*/ val size: kotlin.Int public open override /*1*/ /*delegation*/ fun contains(/*0*/ o: kotlin.String): kotlin.Boolean public open override /*1*/ /*delegation*/ fun containsAll(/*0*/ c: kotlin.Collection): kotlin.Boolean @@ -28,6 +27,7 @@ public final class B : kotlin.List { public open override /*1*/ /*delegation*/ fun get(/*0*/ index: kotlin.Int): kotlin.String public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*delegation*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*1*/ /*delegation*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*delegation*/ fun iterator(): kotlin.Iterator public open override /*1*/ /*delegation*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*1*/ /*delegation*/ fun listIterator(): kotlin.ListIterator @@ -38,7 +38,6 @@ public final class B : kotlin.List { public final class C : kotlin.List { public constructor C() - public open override /*1*/ /*delegation*/ val isEmpty: kotlin.Boolean public open override /*1*/ /*delegation*/ val size: kotlin.Int public open override /*1*/ /*delegation*/ fun contains(/*0*/ o: kotlin.String): kotlin.Boolean public open override /*1*/ /*delegation*/ fun containsAll(/*0*/ c: kotlin.Collection): kotlin.Boolean @@ -46,6 +45,7 @@ public final class C : kotlin.List { public open override /*1*/ /*delegation*/ fun get(/*0*/ index: kotlin.Int): kotlin.String public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*delegation*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*1*/ /*delegation*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*delegation*/ fun iterator(): kotlin.Iterator public open override /*1*/ /*delegation*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*1*/ /*delegation*/ fun listIterator(): kotlin.ListIterator diff --git a/compiler/testData/diagnostics/tests/platformTypes/supertypeTypeArguments.txt b/compiler/testData/diagnostics/tests/platformTypes/supertypeTypeArguments.txt index 27606eec4dd..223e45c0408 100644 --- a/compiler/testData/diagnostics/tests/platformTypes/supertypeTypeArguments.txt +++ b/compiler/testData/diagnostics/tests/platformTypes/supertypeTypeArguments.txt @@ -2,7 +2,6 @@ package public interface ExtMap : kotlin.Map { public abstract override /*1*/ /*fake_override*/ val entries: kotlin.Set> - public abstract override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean public abstract override /*1*/ /*fake_override*/ val keys: kotlin.Set public abstract override /*1*/ /*fake_override*/ val size: kotlin.Int public abstract override /*1*/ /*fake_override*/ val values: kotlin.Collection @@ -11,6 +10,7 @@ public interface ExtMap : kotlin.Map { public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun get(/*0*/ key: K): V? public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } @@ -19,7 +19,6 @@ public final class HashMapEx : java.util.HashMap, ExtMap public open override /*2*/ /*fake_override*/ val entries: kotlin.MutableSet> invisible_fake final override /*1*/ /*fake_override*/ var entrySet: kotlin.(Mutable)Set!>! invisible_fake final override /*1*/ /*fake_override*/ val hashSeed: kotlin.Int - public open override /*2*/ /*fake_override*/ val isEmpty: kotlin.Boolean invisible_fake final override /*1*/ /*fake_override*/ var keySet: kotlin.(Mutable)Set! public open override /*2*/ /*fake_override*/ val keys: kotlin.MutableSet invisible_fake final override /*1*/ /*fake_override*/ val loadFactor: kotlin.Float @@ -47,6 +46,7 @@ public final class HashMapEx : java.util.HashMap, ExtMap invisible_fake final override /*1*/ /*fake_override*/ fun hash(/*0*/ p0: kotlin.Any!): kotlin.Int public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int invisible_fake open override /*1*/ /*fake_override*/ fun init(): kotlin.Unit + public open override /*2*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean invisible_fake open override /*1*/ /*fake_override*/ fun loadFactor(): kotlin.Float invisible_fake open override /*1*/ /*fake_override*/ fun newEntryIterator(): kotlin.(Mutable)Iterator!>! invisible_fake open override /*1*/ /*fake_override*/ fun newKeyIterator(): kotlin.(Mutable)Iterator! diff --git a/compiler/testData/diagnostics/tests/scopes/visibility2.txt b/compiler/testData/diagnostics/tests/scopes/visibility2.txt index f5f312d2511..f79b35d6f47 100644 --- a/compiler/testData/diagnostics/tests/scopes/visibility2.txt +++ b/compiler/testData/diagnostics/tests/scopes/visibility2.txt @@ -34,7 +34,6 @@ package b { public final class NewClass : java.util.ArrayList { public constructor NewClass() invisible_fake final override /*1*/ /*fake_override*/ var elementData: kotlin.Array<(out) kotlin.Any!>! - public open override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int invisible_fake final override /*1*/ /*fake_override*/ var size: kotlin.Int public open override /*1*/ /*fake_override*/ val size: kotlin.Int @@ -56,6 +55,7 @@ package b { invisible_fake open override /*1*/ /*fake_override*/ fun grow(/*0*/ p0: kotlin.Int): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator diff --git a/compiler/testData/diagnostics/tests/subtyping/kt-1457.txt b/compiler/testData/diagnostics/tests/subtyping/kt-1457.txt index 0aae009ad72..7130f910302 100644 --- a/compiler/testData/diagnostics/tests/subtyping/kt-1457.txt +++ b/compiler/testData/diagnostics/tests/subtyping/kt-1457.txt @@ -5,7 +5,6 @@ public fun test(): kotlin.Unit public final class MyListOfPairs : java.util.ArrayList> { public constructor MyListOfPairs() invisible_fake final override /*1*/ /*fake_override*/ var elementData: kotlin.Array<(out) kotlin.Any!>! - public open override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int invisible_fake final override /*1*/ /*fake_override*/ var size: kotlin.Int public open override /*1*/ /*fake_override*/ val size: kotlin.Int @@ -27,6 +26,7 @@ public final class MyListOfPairs : java.util.ArrayList> { invisible_fake open override /*1*/ /*fake_override*/ fun grow(/*0*/ p0: kotlin.Int): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator> public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator> diff --git a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableCollection.txt b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableCollection.txt index 6d74d601f20..87c37d94ee3 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableCollection.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableCollection.txt @@ -5,7 +5,6 @@ public fun foo(): kotlin.Unit @kotlin.jvm.PurelyImplements(value = "kotlin.MutableCollection") public/*package*/ open class A : java.util.AbstractCollection, kotlin.MutableCollection { public/*package*/ constructor A() - public open override /*2*/ /*fake_override*/ val isEmpty: kotlin.Boolean public open override /*2*/ val size: kotlin.Int public open override /*2*/ /*fake_override*/ fun add(/*0*/ e: T): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun addAll(/*0*/ c: kotlin.Collection): kotlin.Boolean @@ -14,6 +13,7 @@ public fun foo(): kotlin.Unit public open override /*2*/ /*fake_override*/ fun containsAll(/*0*/ c: kotlin.Collection): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*2*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean @java.lang.Override() public open override /*2*/ fun iterator(): kotlin.MutableIterator public open override /*2*/ /*fake_override*/ fun remove(/*0*/ o: T): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun removeAll(/*0*/ c: kotlin.Collection): kotlin.Boolean diff --git a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableList.txt b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableList.txt index 4e29533f9d5..cfc63f01e5e 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableList.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/customClassMutableList.txt @@ -5,7 +5,6 @@ public fun foo(): kotlin.Unit @kotlin.jvm.PurelyImplements(value = "kotlin.MutableList") public/*package*/ open class A : java.util.AbstractList, kotlin.MutableList { public/*package*/ constructor A() - public open override /*2*/ /*fake_override*/ val isEmpty: kotlin.Boolean protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int public open override /*2*/ val size: kotlin.Int public open override /*2*/ /*fake_override*/ fun add(/*0*/ e: T): kotlin.Boolean @@ -19,6 +18,7 @@ public fun foo(): kotlin.Unit @java.lang.Override() public open override /*2*/ fun get(/*0*/ index: kotlin.Int): T public open override /*2*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*2*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*2*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*2*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public open override /*2*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*2*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator diff --git a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/invalidFqName.txt b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/invalidFqName.txt index 0959c48875f..4c732671803 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/invalidFqName.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/invalidFqName.txt @@ -5,7 +5,6 @@ public val y: B @kotlin.jvm.PurelyImplements(value = "") public open class A : java.util.AbstractList { public constructor A() - public open override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int public open override /*1*/ val size: kotlin.Int public open override /*1*/ /*fake_override*/ fun add(/*0*/ e: T!): kotlin.Boolean @@ -19,6 +18,7 @@ public val y: B @java.lang.Override() public open override /*1*/ fun get(/*0*/ index: kotlin.Int): T! public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator @@ -44,7 +44,6 @@ public val y: B @kotlin.jvm.PurelyImplements(value = "[INVALID]") public open class B : java.util.AbstractList { public constructor B() - public open override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int public abstract override /*1*/ /*fake_override*/ val size: kotlin.Int public open override /*1*/ /*fake_override*/ fun add(/*0*/ e: T!): kotlin.Boolean @@ -58,6 +57,7 @@ public val y: B public abstract override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): T! public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator diff --git a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/wrongTypeParametersCount.txt b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/wrongTypeParametersCount.txt index f07642ae9d9..ce009ad4e64 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/wrongTypeParametersCount.txt +++ b/compiler/testData/diagnostics/testsWithStdLib/purelyImplementedCollection/wrongTypeParametersCount.txt @@ -5,7 +5,6 @@ public fun foo(): kotlin.Unit @kotlin.jvm.PurelyImplements(value = "kotlin.MutableList") public/*package*/ open class A : java.util.AbstractList { public/*package*/ constructor A() - public open override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int public open override /*1*/ val size: kotlin.Int public open override /*1*/ /*fake_override*/ fun add(/*0*/ e: T!): kotlin.Boolean @@ -19,6 +18,7 @@ public fun foo(): kotlin.Unit @java.lang.Override() public open override /*1*/ fun get(/*0*/ index: kotlin.Int): T! public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.txt index 58d56da992a..cf8a4eb040d 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.txt @@ -13,7 +13,6 @@ public interface HalfSubstitutedTypeParameters { } public interface TrickyList : kotlin.MutableList { - public abstract override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean public abstract override /*1*/ /*fake_override*/ val size: kotlin.Int public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ e: E!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ index: kotlin.Int, /*1*/ element: E!): kotlin.Unit @@ -24,6 +23,7 @@ public interface HalfSubstitutedTypeParameters { public abstract override /*1*/ /*fake_override*/ fun containsAll(/*0*/ c: kotlin.Collection): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): E! public abstract override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public abstract override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public abstract override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator diff --git a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfCollection.txt b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfCollection.txt index ff329a69043..d69465807c0 100644 --- a/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfCollection.txt +++ b/compiler/testData/loadJava/compiledJava/kotlinSignature/propagation/return/SubclassOfCollection.txt @@ -1,13 +1,13 @@ package test public interface SubclassOfCollection : kotlin.MutableCollection { - public abstract override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean public abstract override /*1*/ /*fake_override*/ val size: kotlin.Int public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ e: E!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun addAll(/*0*/ c: kotlin.Collection): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun clear(): kotlin.Unit public abstract override /*1*/ /*fake_override*/ fun contains(/*0*/ o: E!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun containsAll(/*0*/ c: kotlin.Collection): kotlin.Boolean + public abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public abstract override /*1*/ fun iterator(): kotlin.MutableIterator public abstract override /*1*/ /*fake_override*/ fun remove(/*0*/ o: E!): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun removeAll(/*0*/ c: kotlin.Collection): kotlin.Boolean diff --git a/compiler/testData/loadJava/compiledJava/modality/ModalityOfFakeOverrides.txt b/compiler/testData/loadJava/compiledJava/modality/ModalityOfFakeOverrides.txt index 544a2a90269..0e66ab35188 100644 --- a/compiler/testData/loadJava/compiledJava/modality/ModalityOfFakeOverrides.txt +++ b/compiler/testData/loadJava/compiledJava/modality/ModalityOfFakeOverrides.txt @@ -2,7 +2,6 @@ package test public open class ModalityOfFakeOverrides : java.util.AbstractList { public constructor ModalityOfFakeOverrides() - public open override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int public open override /*1*/ val size: kotlin.Int public open override /*1*/ /*fake_override*/ fun add(/*0*/ index: kotlin.Int, /*1*/ element: kotlin.String!): kotlin.Unit @@ -14,6 +13,7 @@ public open class ModalityOfFakeOverrides : java.util.AbstractList): kotlin.Boolean @org.jetbrains.annotations.NotNull() public open override /*1*/ fun get(/*0*/ index: kotlin.Int): kotlin.String public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.txt index 91ad7c48d63..38ea913d632 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/HalfSubstitutedTypeParameters.txt @@ -13,8 +13,6 @@ public interface HalfSubstitutedTypeParameters { } public interface TrickyList : kotlin.MutableList { - public abstract override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean - public abstract override /*1*/ /*fake_override*/ fun (): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ val size: kotlin.Int public abstract override /*1*/ /*fake_override*/ fun (): kotlin.Int public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ e: E): kotlin.Boolean @@ -26,6 +24,7 @@ public interface HalfSubstitutedTypeParameters { public abstract override /*1*/ /*fake_override*/ fun containsAll(/*0*/ c: kotlin.Collection): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): E public abstract override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public abstract override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public abstract override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfCollection.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfCollection.txt index 5cc6aa43df9..ab069e2b8b7 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfCollection.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/kotlinSignature/propagation/return/SubclassOfCollection.txt @@ -1,8 +1,6 @@ package test public interface SubclassOfCollection : kotlin.MutableCollection { - public abstract override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean - public abstract override /*1*/ /*fake_override*/ fun (): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ val size: kotlin.Int public abstract override /*1*/ /*fake_override*/ fun (): kotlin.Int public abstract override /*1*/ /*fake_override*/ fun add(/*0*/ e: E): kotlin.Boolean @@ -10,6 +8,7 @@ public interface SubclassOfCollection : kotlin.MutableCollection { public abstract override /*1*/ /*fake_override*/ fun clear(): kotlin.Unit public abstract override /*1*/ /*fake_override*/ fun contains(/*0*/ o: E): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun containsAll(/*0*/ c: kotlin.Collection): kotlin.Boolean + public abstract override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public abstract override /*1*/ fun iterator(): kotlin.MutableIterator public abstract override /*1*/ /*fake_override*/ fun remove(/*0*/ o: E): kotlin.Boolean public abstract override /*1*/ /*fake_override*/ fun removeAll(/*0*/ c: kotlin.Collection): kotlin.Boolean diff --git a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.txt b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.txt index d5afd0d8c5b..3fd500d52d5 100644 --- a/compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.txt +++ b/compiler/testData/loadJava/compiledKotlin/fromLoadJava/modality/ModalityOfFakeOverrides.txt @@ -2,8 +2,6 @@ package test public open class ModalityOfFakeOverrides : java.util.AbstractList { /*primary*/ public constructor ModalityOfFakeOverrides() - public open override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun (): kotlin.Boolean protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int public open override /*1*/ val size: kotlin.Int public open override /*1*/ fun (): kotlin.Int @@ -16,6 +14,7 @@ public open class ModalityOfFakeOverrides : java.util.AbstractList): kotlin.Boolean public open override /*1*/ fun get(/*0*/ index: kotlin.Int): kotlin.String public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator diff --git a/compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.txt b/compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.txt index 03cebbc586d..b3e747e44ab 100644 --- a/compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.txt +++ b/compiler/testData/loadJava/compiledKotlin/platformTypes/notnullTypeArgument.txt @@ -3,8 +3,6 @@ package test public final class C : java.util.ArrayList { /*primary*/ public constructor C() invisible_fake final override /*1*/ /*fake_override*/ var elementData: kotlin.Array<(out) kotlin.Any!>! - public open override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun (): kotlin.Boolean protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int invisible_fake final override /*1*/ /*fake_override*/ var size: kotlin.Int public open override /*1*/ /*fake_override*/ val size: kotlin.Int @@ -25,6 +23,7 @@ public final class C : java.util.ArrayList { public open override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): kotlin.String invisible_fake open override /*1*/ /*fake_override*/ fun grow(/*0*/ p0: kotlin.Int): kotlin.Unit public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator diff --git a/compiler/testData/loadJava/compiledKotlin/platformTypes/nullableTypeArgument.txt b/compiler/testData/loadJava/compiledKotlin/platformTypes/nullableTypeArgument.txt index a066626d669..e512fe049fd 100644 --- a/compiler/testData/loadJava/compiledKotlin/platformTypes/nullableTypeArgument.txt +++ b/compiler/testData/loadJava/compiledKotlin/platformTypes/nullableTypeArgument.txt @@ -3,8 +3,6 @@ package test public final class C : java.util.ArrayList { /*primary*/ public constructor C() invisible_fake final override /*1*/ /*fake_override*/ var elementData: kotlin.Array<(out) kotlin.Any!>! - public open override /*1*/ /*fake_override*/ val isEmpty: kotlin.Boolean - public open override /*1*/ /*fake_override*/ fun (): kotlin.Boolean protected/*protected and package*/ final override /*1*/ /*fake_override*/ var modCount: kotlin.Int invisible_fake final override /*1*/ /*fake_override*/ var size: kotlin.Int public open override /*1*/ /*fake_override*/ val size: kotlin.Int @@ -25,6 +23,7 @@ public final class C : java.util.ArrayList { public open override /*1*/ /*fake_override*/ fun get(/*0*/ index: kotlin.Int): kotlin.String? invisible_fake open override /*1*/ /*fake_override*/ fun grow(/*0*/ p0: kotlin.Int): kotlin.Unit public open override /*1*/ /*fake_override*/ fun indexOf(/*0*/ o: kotlin.Any?): kotlin.Int + public open override /*1*/ /*fake_override*/ fun isEmpty(): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun iterator(): kotlin.MutableIterator public open override /*1*/ /*fake_override*/ fun lastIndexOf(/*0*/ o: kotlin.Any?): kotlin.Int public open override /*1*/ /*fake_override*/ fun listIterator(): kotlin.MutableListIterator diff --git a/core/builtins/native/kotlin/Collections.kt b/core/builtins/native/kotlin/Collections.kt index a12a01aac6f..bd2b9342fc8 100644 --- a/core/builtins/native/kotlin/Collections.kt +++ b/core/builtins/native/kotlin/Collections.kt @@ -54,7 +54,7 @@ public interface Collection : Iterable { /** * Returns `true` if the collection is empty (contains no elements), `false` otherwise. */ - public val isEmpty: Boolean + public fun isEmpty(): Boolean /** * Checks if the specified element is contained in this collection. @@ -129,7 +129,7 @@ public interface MutableCollection : Collection, MutableIterable { public interface List : Collection { // Query Operations override val size: Int - override val isEmpty: Boolean + override fun isEmpty(): Boolean override fun contains(o: @UnsafeVariance E): Boolean override fun iterator(): Iterator @@ -233,7 +233,7 @@ public interface MutableList : List, MutableCollection { public interface Set : Collection { // Query Operations override val size: Int - override val isEmpty: Boolean + override fun isEmpty(): Boolean override fun contains(o: @UnsafeVariance E): Boolean override fun iterator(): Iterator @@ -279,7 +279,7 @@ public interface Map { /** * Returns `true` if the map is empty (contains no elements), `false` otherwise. */ - public val isEmpty: Boolean + public fun isEmpty(): Boolean /** * Returns `true` if the map contains the specified [key]. diff --git a/core/descriptors/src/org/jetbrains/kotlin/util/OperatorChecker.kt b/core/descriptors/src/org/jetbrains/kotlin/util/OperatorChecker.kt index 96b9d45c2f7..bae9220f105 100644 --- a/core/descriptors/src/org/jetbrains/kotlin/util/OperatorChecker.kt +++ b/core/descriptors/src/org/jetbrains/kotlin/util/OperatorChecker.kt @@ -110,7 +110,7 @@ object OperatorChecks { get() = isExtension || containingDeclaration is ClassDescriptor private val FunctionDescriptor.noValueParameters: Boolean - get() = valueParameters.isEmpty + get() = valueParameters.isEmpty() private val FunctionDescriptor.singleValueParameter: Boolean get() = valueParameters.size == 1 diff --git a/idea/src/org/jetbrains/kotlin/idea/actions/generate/KotlinGenerateSecondaryConstructorAction.kt b/idea/src/org/jetbrains/kotlin/idea/actions/generate/KotlinGenerateSecondaryConstructorAction.kt index 3164829e499..5c4efb91dd4 100644 --- a/idea/src/org/jetbrains/kotlin/idea/actions/generate/KotlinGenerateSecondaryConstructorAction.kt +++ b/idea/src/org/jetbrains/kotlin/idea/actions/generate/KotlinGenerateSecondaryConstructorAction.kt @@ -88,7 +88,7 @@ class KotlinGenerateSecondaryConstructorAction : KotlinGenerateMemberActionBase< .filter { it.isVar || context.diagnostics.forElement(it).any { it.factory in Errors.MUST_BE_INITIALIZED_DIAGNOSTICS } } .map { context.get(BindingContext.VARIABLE, it) as PropertyDescriptor } .map { DescriptorMemberChooserObject(it.source.getPsi()!!, it) } - if (ApplicationManager.getApplication().isUnitTestMode || candidates.isEmpty) return candidates + if (ApplicationManager.getApplication().isUnitTestMode || candidates.isEmpty()) return candidates return with(MemberChooser(candidates.toTypedArray(), true, true, klass.project, false, null)) { title = "Choose Properties to Initialize by Constructor" @@ -126,7 +126,7 @@ class KotlinGenerateSecondaryConstructorAction : KotlinGenerateMemberActionBase< generateConstructor(classDescriptor, propertiesToInitialize, null).singletonOrEmptyList() } - if (prototypes.isEmpty) { + if (prototypes.isEmpty()) { CommonRefactoringUtil.showErrorHint(targetClass.project, editor, "Constructor already exists", commandName, null) return emptyList() } diff --git a/js/js.libraries/src/core/javautil.kt b/js/js.libraries/src/core/javautil.kt index 80f6d39d1a5..06dee4ba4c3 100644 --- a/js/js.libraries/src/core/javautil.kt +++ b/js/js.libraries/src/core/javautil.kt @@ -13,7 +13,7 @@ public interface Comparator { @library public abstract class AbstractCollection() : MutableCollection { - override val isEmpty: Boolean get() = noImpl + override fun isEmpty(): Boolean = noImpl override fun contains(o: E): Boolean = noImpl override fun iterator(): MutableIterator = noImpl @@ -103,7 +103,7 @@ public open class LinkedHashSet( @library public open class HashMap(initialCapacity: Int = DEFAULT_INITIAL_CAPACITY, loadFactor: Float = DEFAULT_LOAD_FACTOR) : MutableMap { override val size: Int get() = noImpl - override val isEmpty: Boolean get() = noImpl + override fun isEmpty(): Boolean = noImpl @Suppress("BASE_WITH_NULLABLE_UPPER_BOUND") override fun get(key: K): V? = noImpl override fun containsKey(key: K): Boolean = noImpl diff --git a/js/js.libraries/src/core/regex.kt b/js/js.libraries/src/core/regex.kt index 2574ec82f26..264ecb11d8b 100644 --- a/js/js.libraries/src/core/regex.kt +++ b/js/js.libraries/src/core/regex.kt @@ -178,7 +178,7 @@ private fun RegExp.findNext(input: String, from: Int): MatchResult? { override val groups: MatchGroupCollection = object : MatchGroupCollection { override val size: Int get() = match.size() - override val isEmpty: Boolean get() = size() == 0 + override fun isEmpty(): Boolean = size() == 0 override fun contains(o: MatchGroup?): Boolean = this.any { it == o } override fun containsAll(c: Collection): Boolean = c.all({contains(it)}) diff --git a/js/js.translator/testData/java/arrayList/cases/isEmpty.kt b/js/js.translator/testData/java/arrayList/cases/isEmpty.kt index 6143b2c2b5d..334c8d92507 100644 --- a/js/js.translator/testData/java/arrayList/cases/isEmpty.kt +++ b/js/js.translator/testData/java/arrayList/cases/isEmpty.kt @@ -5,5 +5,5 @@ import java.util.ArrayList; fun box(): Boolean { val a = ArrayList(); a.add(3) - return !(a.isEmpty) && (ArrayList().isEmpty); + return !(a.isEmpty()) && (ArrayList().isEmpty()); } \ No newline at end of file diff --git a/js/js.translator/testData/java/arrayList/cases/misc.kt b/js/js.translator/testData/java/arrayList/cases/misc.kt index 6f80078db1c..4320bab8ca9 100644 --- a/js/js.translator/testData/java/arrayList/cases/misc.kt +++ b/js/js.translator/testData/java/arrayList/cases/misc.kt @@ -28,7 +28,7 @@ fun box(): Boolean { return false } - if (a.isEmpty || !ArrayList().isEmpty) { + if (a.isEmpty() || !ArrayList().isEmpty()) { return false } @@ -39,7 +39,7 @@ fun box(): Boolean { assertEquals(a, b, "a == b") a.clear() - assertEquals(true, a.isEmpty, "a.isEmpty") + assertEquals(true, a.isEmpty(), "a.isEmpty()") assertEquals(arrayOf(1, 500, 2, 3), list.toTypedArray(), "list.toTypedArray()") diff --git a/js/js.translator/testData/kotlin_lib.js b/js/js.translator/testData/kotlin_lib.js index f41a771ff53..974a41b06a9 100644 --- a/js/js.translator/testData/kotlin_lib.js +++ b/js/js.translator/testData/kotlin_lib.js @@ -398,10 +398,8 @@ } return true; }, - isEmpty: { - get: function () { - return this.size === 0; - } + isEmpty: function () { + return this.size === 0; }, iterator: function () { // TODO: Do not implement mutable iterator() this way, make abstract @@ -972,7 +970,7 @@ }); Kotlin.collectionsMax = function (c, comp) { - if (c.isEmpty) { + if (c.isEmpty()) { //TODO: which exception? throw new Error(); } diff --git a/js/js.translator/testData/maps.js b/js/js.translator/testData/maps.js index 54bf6207e46..c00a9339c2d 100644 --- a/js/js.translator/testData/maps.js +++ b/js/js.translator/testData/maps.js @@ -347,11 +347,9 @@ bucketsByHash = {}; }; - Object.defineProperty(this, "isEmpty", { - get: function () { - return !buckets.length; - } - }); + this.isEmpty = function () { + return !buckets.length; + }; var createBucketAggregator = function (bucketFuncName) { return function () { @@ -574,10 +572,8 @@ iterator: function () { return new Kotlin.PrimitiveHashMapValuesIterator(this.map.map, Object.keys(this.map.map)); }, - isEmpty: { - get: function () { - return this.map.isEmpty; - } + isEmpty: function () { + return this.map.isEmpty(); }, size: { get: function () { @@ -608,10 +604,8 @@ return this.$size; } }, - isEmpty: { - get: function () { - return this.$size === 0; - } + isEmpty: function () { + return this.$size === 0; }, containsKey_za3rmp$: function (key) { // TODO: should process "__proto__" separately? @@ -691,7 +685,7 @@ return this.map; }, toString: function() { - if (this.isEmpty) return "{}"; + if (this.isEmpty()) return "{}"; var map = this.map; var isFirst = true; var builder = "{"; @@ -1067,9 +1061,9 @@ return hashTable.size; }}); - Object.defineProperty(this, "isEmpty", { get: function () { - return hashTable.isEmpty; - }}); + this.isEmpty = function () { + return hashTable.isEmpty(); + }; this.clone = function () { var h = new HashSet(hashingFunction, equalityFunction); diff --git a/js/js.translator/testData/rtti/cases/stdlibEmptyListClass.kt b/js/js.translator/testData/rtti/cases/stdlibEmptyListClass.kt index 2f5c90029c9..505d27dd423 100644 --- a/js/js.translator/testData/rtti/cases/stdlibEmptyListClass.kt +++ b/js/js.translator/testData/rtti/cases/stdlibEmptyListClass.kt @@ -11,7 +11,7 @@ fun box(): String { assertTrue((stdlib_emptyListClass() as Any) is List<*>, "stdlib_emptyListClass() is List<*> #2") assertTrue((stdlib_emptyListClass() as Any) !is ArrayList<*>, "stdlib_emptyListClass() !is ArrayList<*>") - assertTrue(stdlib_emptyListClass().isEmpty, "stdlib_emptyListClass().isEmpty") + assertTrue(stdlib_emptyListClass().isEmpty(), "stdlib_emptyListClass().isEmpty()") assertTrue(stdlib_emptyListClass().size() == 0, "stdlib_emptyListClass().size() == 0") return "OK" diff --git a/libraries/stdlib/src/generated/_Arrays.kt b/libraries/stdlib/src/generated/_Arrays.kt index 323446312fc..781bf373e1c 100644 --- a/libraries/stdlib/src/generated/_Arrays.kt +++ b/libraries/stdlib/src/generated/_Arrays.kt @@ -10175,7 +10175,7 @@ public fun Array.asList(): List { public fun BooleanArray.asList(): List { return object : AbstractList(), RandomAccess { override val size: Int get() = this@asList.size() - override val isEmpty: Boolean get() = this@asList.isEmpty() + override fun isEmpty(): Boolean = this@asList.isEmpty() override fun contains(o: Boolean): Boolean = this@asList.contains(o) override fun iterator(): MutableIterator = this@asList.iterator() as MutableIterator override fun get(index: Int): Boolean = this@asList[index] @@ -10191,7 +10191,7 @@ public fun BooleanArray.asList(): List { public fun ByteArray.asList(): List { return object : AbstractList(), RandomAccess { override val size: Int get() = this@asList.size() - override val isEmpty: Boolean get() = this@asList.isEmpty() + override fun isEmpty(): Boolean = this@asList.isEmpty() override fun contains(o: Byte): Boolean = this@asList.contains(o) override fun iterator(): MutableIterator = this@asList.iterator() as MutableIterator override fun get(index: Int): Byte = this@asList[index] @@ -10207,7 +10207,7 @@ public fun ByteArray.asList(): List { public fun CharArray.asList(): List { return object : AbstractList(), RandomAccess { override val size: Int get() = this@asList.size() - override val isEmpty: Boolean get() = this@asList.isEmpty() + override fun isEmpty(): Boolean = this@asList.isEmpty() override fun contains(o: Char): Boolean = this@asList.contains(o) override fun iterator(): MutableIterator = this@asList.iterator() as MutableIterator override fun get(index: Int): Char = this@asList[index] @@ -10223,7 +10223,7 @@ public fun CharArray.asList(): List { public fun DoubleArray.asList(): List { return object : AbstractList(), RandomAccess { override val size: Int get() = this@asList.size() - override val isEmpty: Boolean get() = this@asList.isEmpty() + override fun isEmpty(): Boolean = this@asList.isEmpty() override fun contains(o: Double): Boolean = this@asList.contains(o) override fun iterator(): MutableIterator = this@asList.iterator() as MutableIterator override fun get(index: Int): Double = this@asList[index] @@ -10239,7 +10239,7 @@ public fun DoubleArray.asList(): List { public fun FloatArray.asList(): List { return object : AbstractList(), RandomAccess { override val size: Int get() = this@asList.size() - override val isEmpty: Boolean get() = this@asList.isEmpty() + override fun isEmpty(): Boolean = this@asList.isEmpty() override fun contains(o: Float): Boolean = this@asList.contains(o) override fun iterator(): MutableIterator = this@asList.iterator() as MutableIterator override fun get(index: Int): Float = this@asList[index] @@ -10255,7 +10255,7 @@ public fun FloatArray.asList(): List { public fun IntArray.asList(): List { return object : AbstractList(), RandomAccess { override val size: Int get() = this@asList.size() - override val isEmpty: Boolean get() = this@asList.isEmpty() + override fun isEmpty(): Boolean = this@asList.isEmpty() override fun contains(o: Int): Boolean = this@asList.contains(o) override fun iterator(): MutableIterator = this@asList.iterator() as MutableIterator override fun get(index: Int): Int = this@asList[index] @@ -10271,7 +10271,7 @@ public fun IntArray.asList(): List { public fun LongArray.asList(): List { return object : AbstractList(), RandomAccess { override val size: Int get() = this@asList.size() - override val isEmpty: Boolean get() = this@asList.isEmpty() + override fun isEmpty(): Boolean = this@asList.isEmpty() override fun contains(o: Long): Boolean = this@asList.contains(o) override fun iterator(): MutableIterator = this@asList.iterator() as MutableIterator override fun get(index: Int): Long = this@asList[index] @@ -10287,7 +10287,7 @@ public fun LongArray.asList(): List { public fun ShortArray.asList(): List { return object : AbstractList(), RandomAccess { override val size: Int get() = this@asList.size() - override val isEmpty: Boolean get() = this@asList.isEmpty() + override fun isEmpty(): Boolean = this@asList.isEmpty() override fun contains(o: Short): Boolean = this@asList.contains(o) override fun iterator(): MutableIterator = this@asList.iterator() as MutableIterator override fun get(index: Int): Short = this@asList[index] diff --git a/libraries/stdlib/src/kotlin/collections/DeprecatedBuiltins.kt b/libraries/stdlib/src/kotlin/collections/DeprecatedBuiltins.kt index 2380393c339..3eaeafb6274 100644 --- a/libraries/stdlib/src/kotlin/collections/DeprecatedBuiltins.kt +++ b/libraries/stdlib/src/kotlin/collections/DeprecatedBuiltins.kt @@ -24,13 +24,6 @@ public inline fun Collection<*>.size() = size @Deprecated("Use property 'size' instead", ReplaceWith("this.size")) public inline fun Map<*, *>.size() = size -@Deprecated("Use property 'isEmpty' instead", ReplaceWith("this.isEmpty")) -public inline fun Collection<*>.isEmpty() = isEmpty - -@Deprecated("Use property 'isEmpty' instead", ReplaceWith("this.isEmpty")) -public inline fun Map<*, *>.isEmpty() = isEmpty - - @Deprecated("Use property 'key' instead", ReplaceWith("this.key")) public fun Map.Entry.getKey(): K = key diff --git a/libraries/stdlib/src/kotlin/collections/JUtil.kt b/libraries/stdlib/src/kotlin/collections/JUtil.kt index 1c9ad52b640..555e1f41560 100644 --- a/libraries/stdlib/src/kotlin/collections/JUtil.kt +++ b/libraries/stdlib/src/kotlin/collections/JUtil.kt @@ -21,7 +21,7 @@ internal object EmptyList : List, Serializable { override fun toString(): String = "[]" override val size: Int get() = 0 - override val isEmpty: Boolean get() = true + override fun isEmpty(): Boolean = true override fun contains(o: Nothing): Boolean = false override fun containsAll(c: Collection): Boolean = c.isEmpty() diff --git a/libraries/stdlib/src/kotlin/collections/MapWithDefault.kt b/libraries/stdlib/src/kotlin/collections/MapWithDefault.kt index 9bb7b44519b..b40e3dbf48c 100644 --- a/libraries/stdlib/src/kotlin/collections/MapWithDefault.kt +++ b/libraries/stdlib/src/kotlin/collections/MapWithDefault.kt @@ -65,7 +65,7 @@ private class MapWithDefaultImpl(public override val map: Map, pr override fun hashCode(): Int = map.hashCode() override fun toString(): String = map.toString() override val size: Int get() = map.size() - override val isEmpty: Boolean get() = map.isEmpty() + override fun isEmpty(): Boolean = map.isEmpty() override fun containsKey(key: K): Boolean = map.containsKey(key) override fun containsValue(value: @UnsafeVariance V): Boolean = map.containsValue(value) override fun get(key: K): V? = map.get(key) @@ -81,7 +81,7 @@ private class MutableMapWithDefaultImpl(public override val map: MutableMa override fun hashCode(): Int = map.hashCode() override fun toString(): String = map.toString() override val size: Int get() = map.size() - override val isEmpty: Boolean get() = map.isEmpty() + override fun isEmpty(): Boolean = map.isEmpty() override fun containsKey(key: K): Boolean = map.containsKey(key) override fun containsValue(value: @UnsafeVariance V): Boolean = map.containsValue(value) override fun get(key: K): V? = map.get(key) diff --git a/libraries/stdlib/src/kotlin/collections/Maps.kt b/libraries/stdlib/src/kotlin/collections/Maps.kt index 47e87b72be3..80df5cd251d 100644 --- a/libraries/stdlib/src/kotlin/collections/Maps.kt +++ b/libraries/stdlib/src/kotlin/collections/Maps.kt @@ -12,7 +12,7 @@ private object EmptyMap : Map, Serializable { override fun toString(): String = "{}" override val size: Int get() = 0 - override val isEmpty: Boolean get() = true + override fun isEmpty(): Boolean = true override fun containsKey(key: Any): Boolean = false override fun containsValue(value: Nothing): Boolean = false diff --git a/libraries/stdlib/src/kotlin/collections/Sets.kt b/libraries/stdlib/src/kotlin/collections/Sets.kt index c0e4af898fc..2e5c5c24dc8 100644 --- a/libraries/stdlib/src/kotlin/collections/Sets.kt +++ b/libraries/stdlib/src/kotlin/collections/Sets.kt @@ -13,7 +13,7 @@ internal object EmptySet : Set, Serializable { override fun toString(): String = "[]" override val size: Int get() = 0 - override val isEmpty: Boolean get() = true + override fun isEmpty(): Boolean = true override fun contains(o: Nothing): Boolean = false override fun containsAll(c: Collection): Boolean = c.isEmpty() diff --git a/libraries/stdlib/src/kotlin/text/regex/RegexJVM.kt b/libraries/stdlib/src/kotlin/text/regex/RegexJVM.kt index 99f8cd3645a..4f6d31c6e85 100644 --- a/libraries/stdlib/src/kotlin/text/regex/RegexJVM.kt +++ b/libraries/stdlib/src/kotlin/text/regex/RegexJVM.kt @@ -221,7 +221,7 @@ private class MatcherMatchResult(private val matcher: Matcher, private val input override val groups: MatchGroupCollection = object : MatchGroupCollection { override val size: Int get() = matchResult.groupCount() + 1 - override val isEmpty: Boolean get() = false + override fun isEmpty(): Boolean = false override fun contains(o: MatchGroup?): Boolean = this.any({ it == o }) override fun containsAll(c: Collection): Boolean = c.all({contains(it)}) diff --git a/libraries/tools/kotlin-stdlib-gen/src/templates/SpecialJVM.kt b/libraries/tools/kotlin-stdlib-gen/src/templates/SpecialJVM.kt index ef9e8b96df0..efc18322432 100644 --- a/libraries/tools/kotlin-stdlib-gen/src/templates/SpecialJVM.kt +++ b/libraries/tools/kotlin-stdlib-gen/src/templates/SpecialJVM.kt @@ -229,7 +229,7 @@ fun specialJVM(): List { """ return object : AbstractList(), RandomAccess { override val size: Int get() = this@asList.size() - override val isEmpty: Boolean get() = this@asList.isEmpty() + override fun isEmpty(): Boolean = this@asList.isEmpty() override fun contains(o: T): Boolean = this@asList.contains(o) override fun iterator(): MutableIterator = this@asList.iterator() as MutableIterator override fun get(index: Int): T = this@asList[index]