JVM_IR fix override equivalence check for collection stub generation
KT-42043 KT-42033
This commit is contained in:
Generated
+5
@@ -5028,6 +5028,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/collections/removeClashKotlin.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("removeClashWithGenerics.kt")
|
||||
public void testRemoveClashWithGenerics() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/collections/removeClashWithGenerics.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("removeOverriddenInJava.kt")
|
||||
public void testRemoveOverriddenInJava() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/collections/removeOverriddenInJava.kt");
|
||||
|
||||
@@ -82,7 +82,9 @@ fun IrType.substitute(params: List<IrTypeParameter>, arguments: List<IrType>): I
|
||||
fun IrType.substitute(substitutionMap: Map<IrTypeParameterSymbol, IrType>): IrType {
|
||||
if (this !is IrSimpleType) return this
|
||||
|
||||
substitutionMap[classifier]?.let { return it }
|
||||
substitutionMap[classifier]?.let {
|
||||
return it.withHasQuestionMark(hasQuestionMark || it is IrSimpleType && it.hasQuestionMark)
|
||||
}
|
||||
|
||||
val newArguments = arguments.map {
|
||||
if (it is IrTypeProjection) {
|
||||
@@ -101,27 +103,39 @@ fun IrType.substitute(substitutionMap: Map<IrTypeParameterSymbol, IrType>): IrTy
|
||||
)
|
||||
}
|
||||
|
||||
private fun getImmediateSupertypes(irClass: IrClass): List<IrSimpleType> {
|
||||
private fun getImmediateSupertypes(irType: IrSimpleType): List<IrSimpleType> {
|
||||
val irClass = irType.getClass()
|
||||
?: throw AssertionError("Not a class type: ${irType.render()}")
|
||||
val originalSupertypes = irClass.superTypes
|
||||
val args = irClass.defaultType.arguments.mapNotNull { (it as? IrTypeProjection)?.type }
|
||||
val arguments =
|
||||
irType.arguments.map {
|
||||
it.typeOrNull
|
||||
?: throw AssertionError("*-projection in supertype arguments: ${irType.render()}")
|
||||
}
|
||||
return originalSupertypes
|
||||
.filter { it.classOrNull != null }
|
||||
.map { superType ->
|
||||
superType.substitute(superType.classOrNull!!.owner.typeParameters, args) as IrSimpleType
|
||||
superType.substitute(irClass.typeParameters, arguments) as IrSimpleType
|
||||
}
|
||||
}
|
||||
|
||||
private fun collectAllSupertypes(irClass: IrClass, result: MutableSet<IrSimpleType>) {
|
||||
val immediateSupertypes = getImmediateSupertypes(irClass)
|
||||
private fun collectAllSupertypes(irType: IrSimpleType, result: MutableSet<IrSimpleType>) {
|
||||
val immediateSupertypes = getImmediateSupertypes(irType)
|
||||
result.addAll(immediateSupertypes)
|
||||
for (supertype in immediateSupertypes) {
|
||||
collectAllSupertypes(supertype.classOrNull!!.owner, result)
|
||||
collectAllSupertypes(supertype, result)
|
||||
}
|
||||
}
|
||||
|
||||
fun getAllSupertypes(irClass: IrClass): MutableSet<IrSimpleType> {
|
||||
// Given the following classes:
|
||||
// open class A<X>
|
||||
// open class B<Y> : A<List<Y>>
|
||||
// class C<Z> : B<List<Z>>
|
||||
// for the class C, this function constructs:
|
||||
// { B<List<Z>>, A<List<List<Z>>, Any }
|
||||
// where Z is a type parameter of class C.
|
||||
fun getAllSubstitutedSupertypes(irClass: IrClass): MutableSet<IrSimpleType> {
|
||||
val result = HashSet<IrSimpleType>()
|
||||
|
||||
collectAllSupertypes(irClass, result)
|
||||
collectAllSupertypes(irClass.defaultType, result)
|
||||
return result
|
||||
}
|
||||
|
||||
+165
-88
@@ -38,6 +38,15 @@ internal val collectionStubMethodLowering = makeIrFilePhase(
|
||||
internal class CollectionStubMethodLowering(val context: JvmBackendContext) : ClassLoweringPass {
|
||||
private val collectionStubComputer = context.collectionStubComputer
|
||||
|
||||
private data class NameAndArity(
|
||||
val name: Name,
|
||||
val typeParametersCount: Int,
|
||||
val valueParametersCount: Int
|
||||
)
|
||||
|
||||
private val IrSimpleFunction.nameAndArity
|
||||
get() = NameAndArity(name, typeParameters.size, valueParameters.size)
|
||||
|
||||
override fun lower(irClass: IrClass) {
|
||||
if (irClass.isInterface) {
|
||||
return
|
||||
@@ -49,60 +58,64 @@ internal class CollectionStubMethodLowering(val context: JvmBackendContext) : Cl
|
||||
// We don't need to generate stub for existing methods, but for FAKE_OVERRIDE methods with ABSTRACT modality,
|
||||
// it means an abstract function in superclass that is not implemented yet,
|
||||
// stub generation is still needed to avoid invocation error.
|
||||
val existingMethodsBySignature = irClass.functions.filterNot {
|
||||
it.modality == Modality.ABSTRACT && it.isFakeOverride
|
||||
}.associateBy { it.toJvmSignature() }
|
||||
val existingMethodsByNameAndArity = irClass.functions
|
||||
.filterNot { it.modality == Modality.ABSTRACT && it.isFakeOverride }
|
||||
.groupBy { it.nameAndArity }
|
||||
|
||||
for (member in methodStubsToGenerate) {
|
||||
val signature = member.toJvmSignature()
|
||||
val existingMethod = existingMethodsBySignature[signature]
|
||||
if (existingMethod != null && areEquivalentSignatures(existingMethod, member)) {
|
||||
// In the case that we find a defined method that matches the stub signature, we add the overridden symbols to that
|
||||
// defined method, so that bridge lowering can still generate correct bridge for that method
|
||||
existingMethod.overriddenSymbols += member.overriddenSymbols
|
||||
} else {
|
||||
// Some stub members require special handling.
|
||||
// In both 'remove' and 'removeAt' cases there are no other member functions with same name in built-in mutable collection
|
||||
// classes, so it's safe to check for the member name itself.
|
||||
when (member.name.asString()) {
|
||||
"remove" -> {
|
||||
// - 'remove' member functions:
|
||||
// kotlin.collections.MutableCollection<E>#remove(E): Boolean
|
||||
// kotlin.collections.MutableMap<K, V>#remove(K): V?
|
||||
// We've checked that corresponding 'remove(T)' member function is not present in the class.
|
||||
// We should add a member function that overrides, respectively:
|
||||
// java.util.Collection<E>#remove(Object): boolean
|
||||
// java.util.Map<K, V>#remove(K): V
|
||||
// This corresponds to replacing value parameter types with 'Any?'.
|
||||
irClass.declarations.add(member.apply {
|
||||
valueParameters = valueParameters.map {
|
||||
it.copyWithCustomTypeSubstitution(this) { context.irBuiltIns.anyNType }
|
||||
}
|
||||
})
|
||||
}
|
||||
"removeAt" -> {
|
||||
// - 'removeAt' member function:
|
||||
// kotlin.collections.MutableList<E>#removeAt(Int): E
|
||||
// We've checked that corresponding 'removeAt(Int)' member function is not present in the class
|
||||
// (if it IS present, special bridges for 'remove(I)' would be generated later in BridgeLowering).
|
||||
// We can't add 'removeAt' here, because it would be different from what old back-end generates
|
||||
// and can break existing Java and/or Kotlin code.
|
||||
// We should add a member function that overrides
|
||||
// java.util.List<E>#remove(int): E
|
||||
// and throws UnsupportedOperationException, just like any other stub.
|
||||
// Also, we should generate a bridge for it if required.
|
||||
val removeIntFun = createRemoveAtStub(member, member.returnType, IrDeclarationOrigin.IR_BUILTINS_STUB)
|
||||
irClass.declarations.add(removeIntFun)
|
||||
val removeIntBridgeFun = createRemoveAtStub(member, context.irBuiltIns.anyNType, IrDeclarationOrigin.BRIDGE)
|
||||
if (removeIntBridgeFun.toJvmSignature() != removeIntFun.toJvmSignature()) {
|
||||
irClass.declarations.add(removeIntBridgeFun)
|
||||
}
|
||||
}
|
||||
else ->
|
||||
irClass.declarations.add(member)
|
||||
}
|
||||
for (stub in methodStubsToGenerate) {
|
||||
val relevantMembers = existingMethodsByNameAndArity[stub.nameAndArity].orEmpty()
|
||||
val existingOverrides = relevantMembers.filter { isStubOverriddenByExistingFun(stub, it) }
|
||||
|
||||
if (existingOverrides.isNotEmpty()) {
|
||||
// In the case that we find a defined method that matches the stub signature,
|
||||
// we add the overridden symbols to that defined method,
|
||||
// so that bridge lowering can still generate correct bridge for that method.
|
||||
existingOverrides.forEach { it.overriddenSymbols += stub.overriddenSymbols }
|
||||
continue
|
||||
}
|
||||
|
||||
// Some stub members require special handling.
|
||||
// In both 'remove' and 'removeAt' cases there are no other member functions with same name in built-in mutable collection
|
||||
// classes, so it's safe to check for the member name itself.
|
||||
when (stub.name.asString()) {
|
||||
"remove" -> {
|
||||
// - 'remove' member functions:
|
||||
// kotlin.collections.MutableCollection<E>#remove(E): Boolean
|
||||
// kotlin.collections.MutableMap<K, V>#remove(K): V?
|
||||
// We've checked that corresponding 'remove(T)' member function is not present in the class.
|
||||
// We should add a member function that overrides, respectively:
|
||||
// java.util.Collection<E>#remove(Object): boolean
|
||||
// java.util.Map<K, V>#remove(K): V
|
||||
// This corresponds to replacing value parameter types with 'Any?'.
|
||||
irClass.declarations.add(stub.apply {
|
||||
valueParameters = valueParameters.map {
|
||||
it.copyWithCustomTypeSubstitution(this) { context.irBuiltIns.anyNType }
|
||||
}
|
||||
})
|
||||
}
|
||||
"removeAt" -> {
|
||||
// - 'removeAt' member function:
|
||||
// kotlin.collections.MutableList<E>#removeAt(Int): E
|
||||
// We've checked that corresponding 'removeAt(Int)' member function is not present in the class
|
||||
// (if it IS present, special bridges for 'remove(I)' would be generated later in BridgeLowering).
|
||||
// We can't add 'removeAt' here, because it would be different from what old back-end generates
|
||||
// and can break existing Java and/or Kotlin code.
|
||||
// We should add a member function that overrides
|
||||
// java.util.List<E>#remove(int): E
|
||||
// and throws UnsupportedOperationException, just like any other stub.
|
||||
// Also, we should generate a bridge for it if required.
|
||||
val removeIntFun = createRemoveAtStub(stub, stub.returnType, IrDeclarationOrigin.IR_BUILTINS_STUB)
|
||||
irClass.declarations.add(removeIntFun)
|
||||
val removeIntBridgeFun = createRemoveAtStub(stub, context.irBuiltIns.anyNType, IrDeclarationOrigin.BRIDGE)
|
||||
if (removeIntBridgeFun.toJvmSignature() != removeIntFun.toJvmSignature()) {
|
||||
irClass.declarations.add(removeIntBridgeFun)
|
||||
}
|
||||
}
|
||||
else ->
|
||||
irClass.declarations.add(stub)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +151,7 @@ internal class CollectionStubMethodLowering(val context: JvmBackendContext) : Cl
|
||||
): IrSimpleFunction {
|
||||
return context.irFactory.buildFun {
|
||||
name = function.name
|
||||
returnType = function.returnType.substitute(substitutionMap)
|
||||
returnType = liftStubMethodReturnType(function).substitute(substitutionMap)
|
||||
visibility = function.visibility
|
||||
origin = IrDeclarationOrigin.IR_BUILTINS_STUB
|
||||
modality = Modality.OPEN
|
||||
@@ -154,6 +167,18 @@ internal class CollectionStubMethodLowering(val context: JvmBackendContext) : Cl
|
||||
}
|
||||
}
|
||||
|
||||
private fun liftStubMethodReturnType(function: IrSimpleFunction) =
|
||||
when (function.name.asString()) {
|
||||
"iterator" ->
|
||||
context.ir.symbols.iterator.typeWithArguments(function.returnType.cast<IrSimpleType>().arguments)
|
||||
"listIterator" ->
|
||||
context.ir.symbols.listIterator.typeWithArguments(function.returnType.cast<IrSimpleType>().arguments)
|
||||
"subList" ->
|
||||
context.ir.symbols.list.typeWithArguments(function.returnType.cast<IrSimpleType>().arguments)
|
||||
else ->
|
||||
function.returnType
|
||||
}
|
||||
|
||||
private fun createThrowingStubBody(function: IrSimpleFunction) =
|
||||
context.createIrBuilder(function.symbol).irBlockBody {
|
||||
// Function body consist only of throwing UnsupportedOperationException statement
|
||||
@@ -163,33 +188,66 @@ internal class CollectionStubMethodLowering(val context: JvmBackendContext) : Cl
|
||||
}
|
||||
}
|
||||
|
||||
private fun areEquivalentSignatures(fun1: IrSimpleFunction, fun2: IrSimpleFunction): Boolean {
|
||||
if (fun1.typeParameters.size != fun2.typeParameters.size) return false
|
||||
if (fun1.valueParameters.size != fun2.valueParameters.size) return false
|
||||
val typeChecker = IrTypeCheckerContextWithAdditionalAxioms(context.irBuiltIns, fun1.typeParameters, fun2.typeParameters)
|
||||
.cast<AbstractTypeCheckerContext>()
|
||||
return fun1.valueParameters.zip(fun2.valueParameters)
|
||||
private fun isStubOverriddenByExistingFun(stubFun: IrSimpleFunction, existingFun: IrSimpleFunction): Boolean {
|
||||
// We don't add a throwing stub if it's effectively overridden by an existing function.
|
||||
// This is true if all of the following conditions are met,
|
||||
// assuming type parameter Ti of the existing function is "equal" to type parameter Si of the generated stub:
|
||||
// - names are same;
|
||||
// - existing function has the same number of type parameters,
|
||||
// and upper bounds for type parameters are equivalent;
|
||||
// - existing function has the same number of value parameters,
|
||||
// and types for value parameters are equivalent;
|
||||
// - return type of the existing function is a subtype of return type of the generated stub.
|
||||
|
||||
if (stubFun.name != existingFun.name) return false
|
||||
if (stubFun.typeParameters.size != existingFun.typeParameters.size) return false
|
||||
if (stubFun.valueParameters.size != existingFun.valueParameters.size) return false
|
||||
|
||||
val typeChecker = createTypeChecker(stubFun, existingFun)
|
||||
|
||||
// Note that type parameters equivalence check doesn't really happen on collection stubs
|
||||
// (because members of Kotlin built-in collection classes don't have type parameters of their own),
|
||||
// but we keep it here for the sake of consistency.
|
||||
if (!areTypeParametersEquivalent(existingFun, stubFun, typeChecker)) return false
|
||||
|
||||
if (!areValueParametersEquivalent(existingFun, stubFun, typeChecker)) return false
|
||||
if (!isReturnTypeOverrideCompliant(existingFun, stubFun, typeChecker)) return false
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
private fun createTypeChecker(overrideFun: IrSimpleFunction, parentFun: IrSimpleFunction): AbstractTypeCheckerContext =
|
||||
IrTypeCheckerContextWithAdditionalAxioms(context.irBuiltIns, overrideFun.typeParameters, parentFun.typeParameters)
|
||||
|
||||
private fun areTypeParametersEquivalent(
|
||||
overrideFun: IrSimpleFunction,
|
||||
parentFun: IrSimpleFunction,
|
||||
typeChecker: AbstractTypeCheckerContext
|
||||
): Boolean =
|
||||
overrideFun.typeParameters.zip(parentFun.typeParameters)
|
||||
.all { (typeParameter1, typeParameter2) ->
|
||||
typeParameter1.superTypes.zip(typeParameter2.superTypes)
|
||||
.all { (supertype1, supertype2) ->
|
||||
AbstractTypeChecker.equalTypes(typeChecker, supertype1, supertype2)
|
||||
}
|
||||
}
|
||||
|
||||
private fun areValueParametersEquivalent(
|
||||
overrideFun: IrSimpleFunction,
|
||||
parentFun: IrSimpleFunction,
|
||||
typeChecker: AbstractTypeCheckerContext
|
||||
): Boolean =
|
||||
overrideFun.valueParameters.zip(parentFun.valueParameters)
|
||||
.all { (valueParameter1, valueParameter2) ->
|
||||
AbstractTypeChecker.equalTypes(typeChecker, valueParameter1.type, valueParameter2.type)
|
||||
}
|
||||
}
|
||||
|
||||
private fun IrSimpleFunction.hackRemoveMethodIfRequired(): IrSimpleFunction {
|
||||
// NB 'remove' method requires some special handling:
|
||||
// - we check that 'remove(T)' is present in the class, where 'T' is a type argument of the collection type
|
||||
// (this matches the signature of the method created above);
|
||||
// - if it is absent, we add 'remove(Any?)' member function,
|
||||
// which corresponds to method 'remove' in java.util.Collection and java.util.Map.
|
||||
if (name.asString() == "remove") {
|
||||
// Note that replacing value parameter types with 'Any?' handles both MutableCollection and MutableMap case:
|
||||
// java.util.Collection<E>#remove has signature 'boolean remove(Object)', and
|
||||
// java.util.Map<K, V>#remove has signature 'V remove(Object)'.
|
||||
valueParameters = valueParameters.map {
|
||||
it.copyWithCustomTypeSubstitution(this) { context.irBuiltIns.anyNType }
|
||||
}
|
||||
}
|
||||
return this
|
||||
}
|
||||
internal fun isReturnTypeOverrideCompliant(
|
||||
overrideFun: IrSimpleFunction,
|
||||
parentFun: IrSimpleFunction,
|
||||
typeChecker: AbstractTypeCheckerContext
|
||||
): Boolean =
|
||||
AbstractTypeChecker.isSubtypeOf(typeChecker, overrideFun.returnType, parentFun.returnType)
|
||||
|
||||
// Copy value parameter with type substitution
|
||||
private fun IrValueParameter.copyWithSubstitution(
|
||||
@@ -221,7 +279,7 @@ internal class CollectionStubMethodLowering(val context: JvmBackendContext) : Cl
|
||||
// We find the most specific type for the immutable collection class from the inheritance chain of target class
|
||||
// Perform type substitution along searching, then use the type arguments obtained from the most specific type
|
||||
// for type substitution.
|
||||
val readOnlyClassType = getAllSupertypes(targetClass).findMostSpecificTypeForClass(readOnlyClass.symbol)
|
||||
val readOnlyClassType = getAllSubstitutedSupertypes(targetClass).findMostSpecificTypeForClass(readOnlyClass.symbol)
|
||||
val readOnlyClassTypeArguments = (readOnlyClassType as IrSimpleType).arguments.mapNotNull { (it as? IrTypeProjection)?.type }
|
||||
|
||||
if (readOnlyClassTypeArguments.isEmpty() || readOnlyClassTypeArguments.size != mutableClass.typeParameters.size) {
|
||||
@@ -281,20 +339,13 @@ internal class CollectionStubComputer(val context: JvmBackendContext) {
|
||||
val readOnlyClass: IrClassSymbol,
|
||||
val mutableClass: IrClassSymbol
|
||||
) {
|
||||
// Preserve old backend's logic to generate stubs for special cases where a mutable method
|
||||
// has the same JVM signature as the immutable method. See KT-36724 for more details.
|
||||
private val specialCaseStubSignaturesForOldBackend = setOf(
|
||||
"listIterator()Ljava/util/ListIterator;",
|
||||
"listIterator(I)Ljava/util/ListIterator;",
|
||||
"subList(II)Ljava/util/List;"
|
||||
)
|
||||
|
||||
val mutableOnlyMethods: Collection<IrSimpleFunction> by lazy {
|
||||
val readOnlyMethodSignatures = readOnlyClass
|
||||
.functions
|
||||
.map { getJvmSignature(it.owner) }
|
||||
.filter { it !in specialCaseStubSignaturesForOldBackend }
|
||||
.toHashSet()
|
||||
val readOnlyMethodSignatures =
|
||||
readOnlyClass.functions
|
||||
.filter { !it.owner.isSpecialCaseStubForOldBackend() }
|
||||
.map { getJvmSignature(it.owner) }
|
||||
.toHashSet()
|
||||
mutableClass.functions
|
||||
.map { it.owner }
|
||||
.filter { getJvmSignature(it) !in readOnlyMethodSignatures }
|
||||
@@ -306,6 +357,32 @@ internal class CollectionStubComputer(val context: JvmBackendContext) {
|
||||
operator fun component3() = mutableOnlyMethods
|
||||
}
|
||||
|
||||
// Preserve old backend's logic to generate stubs for special cases where a mutable method
|
||||
// has the same JVM signature as the immutable method. See KT-36724 for more details.
|
||||
private fun IrSimpleFunction.isSpecialCaseStubForOldBackend(): Boolean {
|
||||
return when (name.asString()) {
|
||||
"iterator" -> {
|
||||
val parentClassSymbol = parentAsClass.symbol
|
||||
// Due to the specific way Kotlin built-in collection classes are written,
|
||||
// old JVM back-end generates throwing method stubs for the following abstract member functions:
|
||||
// Iterable<T>#iterator(): Iterator<T>
|
||||
// Collection<E>#iterator(): Iterator<E>
|
||||
// Set<E>#iterator(): Iterator<E>
|
||||
// This happens because MutableIterable, MutableCollection, and MutableSet contain explicit override
|
||||
// override fun iterator(): MutableIterator<E>
|
||||
// and MutableList doesn't, which makes corresponding member of MutableList a FAKE_OVERRIDE.
|
||||
with(context.ir.symbols) {
|
||||
// Note that here we are looking at a read-only collection member.
|
||||
parentClassSymbol == iterable || parentClassSymbol == collection || parentClassSymbol == set
|
||||
}
|
||||
}
|
||||
"listIterator", "subList" ->
|
||||
true
|
||||
else ->
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
private val preComputedStubs: Collection<StubsForCollectionClass> by lazy {
|
||||
with(context.ir.symbols) {
|
||||
listOf(
|
||||
|
||||
@@ -139,6 +139,9 @@ fun IrClassifierSymbol.typeWith(arguments: List<IrType>): IrSimpleType =
|
||||
emptyList()
|
||||
)
|
||||
|
||||
fun IrClassifierSymbol.typeWithArguments(arguments: List<IrTypeArgument>): IrSimpleType =
|
||||
IrSimpleTypeImpl(this, false, arguments, emptyList())
|
||||
|
||||
fun IrClass.typeWith(arguments: List<IrType>) = this.symbol.typeWith(arguments)
|
||||
|
||||
fun IrClass.typeWith(vararg arguments: IrType) = this.symbol.typeWith(arguments.toList())
|
||||
|
||||
@@ -8,7 +8,7 @@ open class Content() {
|
||||
|
||||
interface ContentBox<T : Content> : List<T>
|
||||
|
||||
object Impl : ContentBox<Content> , AbstractList<Content>() {
|
||||
object Impl : ContentBox<Content>, AbstractList<Content>() {
|
||||
override fun get(index: Int) = Content()
|
||||
|
||||
override val size: Int
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
// TARGET_BACKEND: JVM
|
||||
// WITH_RUNTUME
|
||||
|
||||
// See also: KT-42083
|
||||
|
||||
var removed = ""
|
||||
|
||||
class MyCharSequenceSet1 : Set<CharSequence> {
|
||||
override val size: Int get() = TODO()
|
||||
override fun contains(element: CharSequence): Boolean = TODO()
|
||||
override fun containsAll(elements: Collection<CharSequence>): Boolean = TODO()
|
||||
override fun isEmpty(): Boolean = TODO()
|
||||
override fun iterator(): Iterator<CharSequence> = TODO()
|
||||
|
||||
fun <Q : CharSequence> remove(cs: Q): Boolean {
|
||||
removed = cs.toString()
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
class MyCharSequenceSet2 : Set<CharSequence> {
|
||||
override val size: Int get() = TODO()
|
||||
override fun contains(element: CharSequence): Boolean = TODO()
|
||||
override fun containsAll(elements: Collection<CharSequence>): Boolean = TODO()
|
||||
override fun isEmpty(): Boolean = TODO()
|
||||
override fun iterator(): Iterator<CharSequence> = TODO()
|
||||
|
||||
fun <Q : CharSequence> remove(cs: Q?): Boolean {
|
||||
removed = cs.toString()
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
val s1 = MyCharSequenceSet1()
|
||||
s1.remove("OK")
|
||||
if (removed != "OK") throw AssertionError()
|
||||
|
||||
try {
|
||||
(s1 as java.util.Set<CharSequence>).remove("OK")
|
||||
throw AssertionError("(s1 as java.util.Set<CharSequence>) should throw UnsupportedOperationException")
|
||||
} catch (e: UnsupportedOperationException) {
|
||||
} catch (e: Throwable) {
|
||||
throw AssertionError("(s1 as java.util.Set<CharSequence>) should throw UnsupportedOperationException")
|
||||
}
|
||||
|
||||
removed = ""
|
||||
|
||||
val s2 = MyCharSequenceSet2()
|
||||
s2.remove("OK")
|
||||
if (removed != "OK") throw AssertionError()
|
||||
|
||||
try {
|
||||
(s2 as java.util.Set<CharSequence>).remove("OK")
|
||||
throw AssertionError("(s2 as java.util.Set<CharSequence>) should throw UnsupportedOperationException")
|
||||
} catch (e: UnsupportedOperationException) {
|
||||
} catch (e: Throwable) {
|
||||
throw AssertionError("(s2 as java.util.Set<CharSequence>) should throw UnsupportedOperationException")
|
||||
}
|
||||
|
||||
return "OK"
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
// Ensure the proper collection stubs are added, in
|
||||
// particular *not* when specialized implementations are provided.
|
||||
class MyList<E> : List<E> {
|
||||
val elements = ArrayList<E>()
|
||||
|
||||
class MyListIterator<E>(
|
||||
val list: ArrayList<E>,
|
||||
start: Int,
|
||||
private val end: Int
|
||||
) : ListIterator<E> {
|
||||
var index = start
|
||||
override fun hasNext() = index < end
|
||||
override fun next() = list[index++]
|
||||
override fun hasPrevious() = index > 0
|
||||
override fun nextIndex() = index + 1
|
||||
override fun previous() = list[--index]
|
||||
override fun previousIndex() = index - 1
|
||||
}
|
||||
|
||||
// List<E> implementation:
|
||||
override fun listIterator(index: Int) = MyListIterator(elements, index, size)
|
||||
override fun listIterator() = listIterator(0)
|
||||
override fun iterator() = listIterator()
|
||||
|
||||
override val size get() = elements.size
|
||||
override fun contains(element: E) = elements.contains(element)
|
||||
override fun containsAll(elements: Collection<E>) = this.elements.containsAll(elements)
|
||||
override operator fun get(index: Int) = elements[index]
|
||||
override fun indexOf(element: E): Int = elements.indexOf(element)
|
||||
override fun lastIndexOf(element: E): Int = elements.lastIndexOf(element)
|
||||
override fun isEmpty() = elements.isEmpty()
|
||||
override fun subList(fromIndex: Int, toIndex: Int) = elements.subList(fromIndex, toIndex)
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
@kotlin.Metadata
|
||||
public final class MyList$MyListIterator {
|
||||
// source: 'customListIterator.kt'
|
||||
private final field end: int
|
||||
private field index: int
|
||||
private final @org.jetbrains.annotations.NotNull field list: java.util.ArrayList
|
||||
public method <init>(@org.jetbrains.annotations.NotNull p0: java.util.ArrayList, p1: int, p2: int): void
|
||||
public method add(p0: java.lang.Object): void
|
||||
public final method getIndex(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getList(): java.util.ArrayList
|
||||
public method hasNext(): boolean
|
||||
public method hasPrevious(): boolean
|
||||
public method next(): java.lang.Object
|
||||
public method nextIndex(): int
|
||||
public method previous(): java.lang.Object
|
||||
public method previousIndex(): int
|
||||
public method remove(): void
|
||||
public method set(p0: java.lang.Object): void
|
||||
public final method setIndex(p0: int): void
|
||||
public final inner class MyList$MyListIterator
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class MyList {
|
||||
// source: 'customListIterator.kt'
|
||||
private final @org.jetbrains.annotations.NotNull field elements: java.util.ArrayList
|
||||
public method <init>(): void
|
||||
public method add(p0: int, p1: java.lang.Object): void
|
||||
public method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: int, p1: java.util.Collection): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public method contains(p0: java.lang.Object): boolean
|
||||
public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public method get(p0: int): java.lang.Object
|
||||
public final @org.jetbrains.annotations.NotNull method getElements(): java.util.ArrayList
|
||||
public method getSize(): int
|
||||
public method indexOf(p0: java.lang.Object): int
|
||||
public method isEmpty(): boolean
|
||||
public @org.jetbrains.annotations.NotNull method iterator(): MyList$MyListIterator
|
||||
public synthetic bridge method iterator(): java.util.Iterator
|
||||
public method lastIndexOf(p0: java.lang.Object): int
|
||||
public @org.jetbrains.annotations.NotNull method listIterator(): MyList$MyListIterator
|
||||
public synthetic bridge method listIterator(): java.util.ListIterator
|
||||
public @org.jetbrains.annotations.NotNull method listIterator(p0: int): MyList$MyListIterator
|
||||
public synthetic bridge method listIterator(p0: int): java.util.ListIterator
|
||||
public method remove(p0: int): java.lang.Object
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public method set(p0: int, p1: java.lang.Object): java.lang.Object
|
||||
public bridge final method size(): int
|
||||
public @org.jetbrains.annotations.NotNull method subList(p0: int, p1: int): java.util.List
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
public final inner class MyList$MyListIterator
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
// Ensure the proper collection stubs are added, in
|
||||
// particular *not* when specialized implementations are provided.
|
||||
class MyList<E> : MutableList<E> {
|
||||
val elements = ArrayList<E>()
|
||||
|
||||
class MyListIterator<E>(
|
||||
val list: ArrayList<E>,
|
||||
start: Int,
|
||||
private val end: Int
|
||||
) : MutableListIterator<E> {
|
||||
var index = start
|
||||
override fun hasNext() = index < end
|
||||
override fun next() = list[index++]
|
||||
override fun hasPrevious() = index > 0
|
||||
override fun nextIndex() = index + 1
|
||||
override fun previous() = list[--index]
|
||||
override fun previousIndex() = index - 1
|
||||
|
||||
override fun add(element: E): Unit = TODO()
|
||||
override fun remove(): Unit = TODO()
|
||||
override fun set(element: E): Unit = TODO()
|
||||
}
|
||||
|
||||
// List<E> implementation:
|
||||
override fun listIterator(index: Int) = MyListIterator(elements, index, size)
|
||||
override fun listIterator() = listIterator(0)
|
||||
override fun iterator() = listIterator()
|
||||
|
||||
override val size get() = elements.size
|
||||
override fun contains(element: E) = elements.contains(element)
|
||||
override fun containsAll(elements: Collection<E>) = this.elements.containsAll(elements)
|
||||
override operator fun get(index: Int) = elements[index]
|
||||
override fun indexOf(element: E): Int = elements.indexOf(element)
|
||||
override fun lastIndexOf(element: E): Int = elements.lastIndexOf(element)
|
||||
override fun isEmpty() = elements.isEmpty()
|
||||
override fun subList(fromIndex: Int, toIndex: Int) = elements.subList(fromIndex, toIndex)
|
||||
|
||||
// MutableList operations
|
||||
override fun add(element: E): Boolean = TODO()
|
||||
override fun add(index: Int, element: E): Unit = TODO()
|
||||
override fun addAll(index: Int, elements: Collection<E>): Boolean = TODO()
|
||||
override fun addAll(elements: Collection<E>): Boolean = TODO()
|
||||
override fun clear(): Unit = TODO()
|
||||
override fun remove(element: E): Boolean = TODO()
|
||||
override fun removeAll(elements: Collection<E>): Boolean = TODO()
|
||||
override fun removeAt(index: Int): E = TODO()
|
||||
override fun retainAll(elements: Collection<E>): Boolean = TODO()
|
||||
override fun set(index: Int, element: E): E = TODO()
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
@kotlin.Metadata
|
||||
public final class MyList$MyListIterator {
|
||||
// source: 'customMutableListIterator.kt'
|
||||
private final field end: int
|
||||
private field index: int
|
||||
private final @org.jetbrains.annotations.NotNull field list: java.util.ArrayList
|
||||
public method <init>(@org.jetbrains.annotations.NotNull p0: java.util.ArrayList, p1: int, p2: int): void
|
||||
public method add(p0: java.lang.Object): void
|
||||
public final method getIndex(): int
|
||||
public final @org.jetbrains.annotations.NotNull method getList(): java.util.ArrayList
|
||||
public method hasNext(): boolean
|
||||
public method hasPrevious(): boolean
|
||||
public method next(): java.lang.Object
|
||||
public method nextIndex(): int
|
||||
public method previous(): java.lang.Object
|
||||
public method previousIndex(): int
|
||||
public method remove(): void
|
||||
public method set(p0: java.lang.Object): void
|
||||
public final method setIndex(p0: int): void
|
||||
public final inner class MyList$MyListIterator
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class MyList {
|
||||
// source: 'customMutableListIterator.kt'
|
||||
private final @org.jetbrains.annotations.NotNull field elements: java.util.ArrayList
|
||||
public method <init>(): void
|
||||
public method add(p0: int, p1: java.lang.Object): void
|
||||
public method add(p0: java.lang.Object): boolean
|
||||
public method addAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public method addAll(p0: int, @org.jetbrains.annotations.NotNull p1: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public method contains(p0: java.lang.Object): boolean
|
||||
public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public method get(p0: int): java.lang.Object
|
||||
public final @org.jetbrains.annotations.NotNull method getElements(): java.util.ArrayList
|
||||
public method getSize(): int
|
||||
public method indexOf(p0: java.lang.Object): int
|
||||
public method isEmpty(): boolean
|
||||
public @org.jetbrains.annotations.NotNull method iterator(): MyList$MyListIterator
|
||||
public synthetic bridge method iterator(): java.util.Iterator
|
||||
public method lastIndexOf(p0: java.lang.Object): int
|
||||
public @org.jetbrains.annotations.NotNull method listIterator(): MyList$MyListIterator
|
||||
public synthetic bridge method listIterator(): java.util.ListIterator
|
||||
public @org.jetbrains.annotations.NotNull method listIterator(p0: int): MyList$MyListIterator
|
||||
public synthetic bridge method listIterator(p0: int): java.util.ListIterator
|
||||
public bridge final method remove(p0: int): java.lang.Object
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public method removeAt(p0: int): java.lang.Object
|
||||
public method retainAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public method set(p0: int, p1: java.lang.Object): java.lang.Object
|
||||
public bridge final method size(): int
|
||||
public @org.jetbrains.annotations.NotNull method subList(p0: int, p1: int): java.util.List
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
public final inner class MyList$MyListIterator
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// Ensure the proper collection stubs are added, in
|
||||
// particular *not* when specialized implementations are provided.
|
||||
|
||||
class MyCollection<E> : Collection<E> {
|
||||
class MyIterator<E> : Iterator<E> {
|
||||
override fun hasNext(): Boolean = TODO()
|
||||
override fun next(): E = TODO()
|
||||
}
|
||||
|
||||
override val size: Int get() = TODO()
|
||||
override fun contains(element: E): Boolean = TODO()
|
||||
override fun containsAll(elements: Collection<E>): Boolean = TODO()
|
||||
override fun isEmpty(): Boolean = TODO()
|
||||
override fun iterator() = MyIterator<E>()
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
@kotlin.Metadata
|
||||
public final class MyCollection$MyIterator {
|
||||
// source: 'noStubsForCollection.kt'
|
||||
public method <init>(): void
|
||||
public method hasNext(): boolean
|
||||
public method next(): java.lang.Object
|
||||
public method remove(): void
|
||||
public final inner class MyCollection$MyIterator
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class MyCollection {
|
||||
// source: 'noStubsForCollection.kt'
|
||||
public method <init>(): void
|
||||
public method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public method contains(p0: java.lang.Object): boolean
|
||||
public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public method getSize(): int
|
||||
public method isEmpty(): boolean
|
||||
public @org.jetbrains.annotations.NotNull method iterator(): MyCollection$MyIterator
|
||||
public synthetic bridge method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
public final inner class MyCollection$MyIterator
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
// Ensure the proper collection stubs are added, in
|
||||
// particular *not* when specialized implementations are provided.
|
||||
|
||||
// IGNORE_BACKEND: JVM_IR
|
||||
// TODO KT-42067 JVM_IR generates extra bridges:
|
||||
// public bridge final method entrySet(): MyMap$MySet
|
||||
// public bridge final method keySet(): MyMap$MySet
|
||||
// public bridge final method values(): java.util.ArrayList
|
||||
class MyMap<K, V> : Map<K, V> {
|
||||
|
||||
class MySet<E> : Set<E> {
|
||||
override fun contains(element: E): Boolean = TODO()
|
||||
override fun iterator(): Iterator<E> = TODO()
|
||||
override fun isEmpty(): Boolean = TODO()
|
||||
override fun containsAll(elements: Collection<E>): Boolean = TODO()
|
||||
override val size: Int get() = TODO()
|
||||
}
|
||||
|
||||
override val entries get() = MySet<Map.Entry<K,V>>()
|
||||
override val keys get() = MySet<K>()
|
||||
override val size: Int get() = TODO()
|
||||
override val values get() = ArrayList<V>()
|
||||
|
||||
override fun containsKey(key: K): Boolean = TODO()
|
||||
override fun containsValue(value: V): Boolean = TODO()
|
||||
override fun get(key: K): V = TODO()
|
||||
override fun isEmpty(): Boolean = TODO()
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
@kotlin.Metadata
|
||||
public final class MyMap$MySet {
|
||||
// source: 'noStubsForMapImplementations.kt'
|
||||
public method <init>(): void
|
||||
public method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public method contains(p0: java.lang.Object): boolean
|
||||
public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public method getSize(): int
|
||||
public method isEmpty(): boolean
|
||||
public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
public final inner class MyMap$MySet
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class MyMap {
|
||||
// source: 'noStubsForMapImplementations.kt'
|
||||
public method <init>(): void
|
||||
public method clear(): void
|
||||
public method containsKey(p0: java.lang.Object): boolean
|
||||
public method containsValue(p0: java.lang.Object): boolean
|
||||
public bridge final method entrySet(): java.util.Set
|
||||
public method get(p0: java.lang.Object): java.lang.Object
|
||||
public @org.jetbrains.annotations.NotNull method getEntries(): MyMap$MySet
|
||||
public @org.jetbrains.annotations.NotNull method getKeys(): MyMap$MySet
|
||||
public method getSize(): int
|
||||
public @org.jetbrains.annotations.NotNull method getValues(): java.util.ArrayList
|
||||
public method isEmpty(): boolean
|
||||
public bridge final method keySet(): java.util.Set
|
||||
public method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object
|
||||
public method putAll(p0: java.util.Map): void
|
||||
public method remove(p0: java.lang.Object): java.lang.Object
|
||||
public bridge final method size(): int
|
||||
public bridge final method values(): java.util.Collection
|
||||
public final inner class MyMap$MySet
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
// Ensure the proper collection stubs are added, in
|
||||
// particular *not* when specialized implementations are provided.
|
||||
class MySet<E> : MutableSet<E> {
|
||||
val elements: ArrayList<E> = ArrayList<E>()
|
||||
|
||||
override val size: Int
|
||||
get() = TODO()
|
||||
|
||||
override fun add(element: E): Boolean = TODO()
|
||||
override fun addAll(elements: Collection<E>): Boolean = TODO()
|
||||
override fun clear(): Unit = TODO()
|
||||
override fun remove(element: E): Boolean = TODO()
|
||||
override fun removeAll(elements: Collection<E>): Boolean = TODO()
|
||||
override fun retainAll(elements: Collection<E>): Boolean = TODO()
|
||||
override fun contains(element: E): Boolean = TODO()
|
||||
override fun containsAll(elements: Collection<E>): Boolean = TODO()
|
||||
override fun isEmpty(): Boolean = TODO()
|
||||
|
||||
class MySetIterator<E>(elements: List<E>) : MutableIterator<E> {
|
||||
override fun hasNext(): Boolean = TODO()
|
||||
override fun next(): E = TODO()
|
||||
override fun remove(): Unit = TODO()
|
||||
}
|
||||
|
||||
override fun iterator() = MySetIterator(elements)
|
||||
}
|
||||
Vendored
+33
@@ -0,0 +1,33 @@
|
||||
@kotlin.Metadata
|
||||
public final class MySet$MySetIterator {
|
||||
// source: 'noStubsForMutableSetIterators.kt'
|
||||
public method <init>(@org.jetbrains.annotations.NotNull p0: java.util.List): void
|
||||
public method hasNext(): boolean
|
||||
public method next(): java.lang.Object
|
||||
public method remove(): void
|
||||
public final inner class MySet$MySetIterator
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class MySet {
|
||||
// source: 'noStubsForMutableSetIterators.kt'
|
||||
private final @org.jetbrains.annotations.NotNull field elements: java.util.ArrayList
|
||||
public method <init>(): void
|
||||
public method add(p0: java.lang.Object): boolean
|
||||
public method addAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public method contains(p0: java.lang.Object): boolean
|
||||
public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public final @org.jetbrains.annotations.NotNull method getElements(): java.util.ArrayList
|
||||
public method getSize(): int
|
||||
public method isEmpty(): boolean
|
||||
public @org.jetbrains.annotations.NotNull method iterator(): MySet$MySetIterator
|
||||
public synthetic bridge method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public method retainAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
public final inner class MySet$MySetIterator
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// Ensure the proper collection stubs are added, in
|
||||
// particular *not* when specialized implementations are provided.
|
||||
|
||||
class MySet<E> : Set<E> {
|
||||
val elements: ArrayList<E> = ArrayList<E>()
|
||||
|
||||
override val size: Int get() = TODO()
|
||||
override fun contains(element: E): Boolean = TODO()
|
||||
override fun containsAll(elements: Collection<E>): Boolean = TODO()
|
||||
override fun isEmpty(): Boolean = TODO()
|
||||
|
||||
class MySetIterator<E>(elements: List<E>) : Iterator<E> {
|
||||
override fun hasNext(): Boolean = TODO()
|
||||
override fun next(): E = TODO()
|
||||
}
|
||||
|
||||
override fun iterator() = MySetIterator(elements)
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
@kotlin.Metadata
|
||||
public final class MySet$MySetIterator {
|
||||
// source: 'noStubsForSetIterators.kt'
|
||||
public method <init>(@org.jetbrains.annotations.NotNull p0: java.util.List): void
|
||||
public method hasNext(): boolean
|
||||
public method next(): java.lang.Object
|
||||
public method remove(): void
|
||||
public final inner class MySet$MySetIterator
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class MySet {
|
||||
// source: 'noStubsForSetIterators.kt'
|
||||
private final @org.jetbrains.annotations.NotNull field elements: java.util.ArrayList
|
||||
public method <init>(): void
|
||||
public method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public method contains(p0: java.lang.Object): boolean
|
||||
public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public final @org.jetbrains.annotations.NotNull method getElements(): java.util.ArrayList
|
||||
public method getSize(): int
|
||||
public method isEmpty(): boolean
|
||||
public @org.jetbrains.annotations.NotNull method iterator(): MySet$MySetIterator
|
||||
public synthetic bridge method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
public final inner class MySet$MySetIterator
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
class MyIterable<E> : Iterable<E> {
|
||||
class MyIterator<E> : Iterator<E> {
|
||||
override fun hasNext(): Boolean = TODO()
|
||||
override fun next(): E = TODO()
|
||||
}
|
||||
|
||||
override fun iterator(): Iterator<E> = TODO()
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
@kotlin.Metadata
|
||||
public final class MyIterable$MyIterator {
|
||||
// source: 'noStubsInIterable.kt'
|
||||
public method <init>(): void
|
||||
public method hasNext(): boolean
|
||||
public method next(): java.lang.Object
|
||||
public method remove(): void
|
||||
public final inner class MyIterable$MyIterator
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class MyIterable {
|
||||
// source: 'noStubsInIterable.kt'
|
||||
public method <init>(): void
|
||||
public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator
|
||||
public final inner class MyIterable$MyIterator
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
class MyIterable<E> : MutableIterable<E> {
|
||||
class MyIterator<E> : MutableIterator<E> {
|
||||
override fun hasNext(): Boolean = TODO()
|
||||
override fun next(): E = TODO()
|
||||
override fun remove() { TODO() }
|
||||
}
|
||||
|
||||
override fun iterator(): MutableIterator<E> = TODO()
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
@kotlin.Metadata
|
||||
public final class MyIterable$MyIterator {
|
||||
// source: 'noStubsInMutableIterable.kt'
|
||||
public method <init>(): void
|
||||
public method hasNext(): boolean
|
||||
public method next(): java.lang.Object
|
||||
public method remove(): void
|
||||
public final inner class MyIterable$MyIterator
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class MyIterable {
|
||||
// source: 'noStubsInMutableIterable.kt'
|
||||
public method <init>(): void
|
||||
public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator
|
||||
public final inner class MyIterable$MyIterator
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
// See KT-42033
|
||||
|
||||
interface ObservableMap<K, V> : Map<K, V>
|
||||
|
||||
abstract class ObservableMutableMap<K, V> : ObservableMap<K, V> {
|
||||
fun put(key: K, value: V): V? = value
|
||||
|
||||
fun remove(key: K): V? = null
|
||||
|
||||
fun putAll(from: Map<out K, V>) {
|
||||
}
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
@kotlin.Metadata
|
||||
public interface ObservableMap {
|
||||
// source: 'observableMutableMap.kt'
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class ObservableMutableMap {
|
||||
// source: 'observableMutableMap.kt'
|
||||
public method <init>(): void
|
||||
public method clear(): void
|
||||
public abstract method containsKey(p0: java.lang.Object): boolean
|
||||
public abstract method containsValue(p0: java.lang.Object): boolean
|
||||
public bridge final method entrySet(): java.util.Set
|
||||
public abstract method get(p0: java.lang.Object): java.lang.Object
|
||||
public abstract method getEntries(): java.util.Set
|
||||
public abstract method getKeys(): java.util.Set
|
||||
public abstract method getSize(): int
|
||||
public abstract method getValues(): java.util.Collection
|
||||
public bridge final method keySet(): java.util.Set
|
||||
public final @org.jetbrains.annotations.Nullable method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object
|
||||
public final method putAll(@org.jetbrains.annotations.NotNull p0: java.util.Map): void
|
||||
public final @org.jetbrains.annotations.Nullable method remove(p0: java.lang.Object): java.lang.Object
|
||||
public bridge final method size(): int
|
||||
public bridge final method values(): java.util.Collection
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
@kotlin.Metadata
|
||||
public interface ObservableMap {
|
||||
// source: 'observableMutableMap.kt'
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class ObservableMutableMap {
|
||||
// source: 'observableMutableMap.kt'
|
||||
public method <init>(): void
|
||||
public method clear(): void
|
||||
public bridge final method entrySet(): java.util.Set
|
||||
public abstract method getEntries(): java.util.Set
|
||||
public abstract method getKeys(): java.util.Set
|
||||
public abstract method getSize(): int
|
||||
public abstract method getValues(): java.util.Collection
|
||||
public bridge final method keySet(): java.util.Set
|
||||
public final @org.jetbrains.annotations.Nullable method put(p0: java.lang.Object, p1: java.lang.Object): java.lang.Object
|
||||
public final method putAll(@org.jetbrains.annotations.NotNull p0: java.util.Map): void
|
||||
public final @org.jetbrains.annotations.Nullable method remove(p0: java.lang.Object): java.lang.Object
|
||||
public bridge final method size(): int
|
||||
public bridge final method values(): java.util.Collection
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
abstract class ACA : Collection<Any>
|
||||
|
||||
abstract class ACAN : Collection<Any?>
|
||||
|
||||
abstract class ACI : Collection<Int>
|
||||
|
||||
abstract class ACIN : Collection<Int?>
|
||||
|
||||
abstract class ACS : Collection<String>
|
||||
|
||||
abstract class ACSN : Collection<String?>
|
||||
|
||||
abstract class ACT<T> : Collection<T>
|
||||
|
||||
+133
@@ -0,0 +1,133 @@
|
||||
@kotlin.Metadata
|
||||
public abstract class ACA {
|
||||
// source: 'abstractCollections.kt'
|
||||
public method <init>(): void
|
||||
public method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public abstract method contains(p0: java.lang.Object): boolean
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class ACAN {
|
||||
// source: 'abstractCollections.kt'
|
||||
public method <init>(): void
|
||||
public method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public abstract method contains(p0: java.lang.Object): boolean
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class ACI {
|
||||
// source: 'abstractCollections.kt'
|
||||
public method <init>(): void
|
||||
public method add(p0: int): boolean
|
||||
public synthetic method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public abstract method contains(p0: int): boolean
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class ACIN {
|
||||
// source: 'abstractCollections.kt'
|
||||
public method <init>(): void
|
||||
public method add(p0: java.lang.Integer): boolean
|
||||
public synthetic method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public abstract method contains(p0: java.lang.Integer): boolean
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class ACS {
|
||||
// source: 'abstractCollections.kt'
|
||||
public method <init>(): void
|
||||
public synthetic method add(p0: java.lang.Object): boolean
|
||||
public method add(p0: java.lang.String): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public abstract method contains(p0: java.lang.String): boolean
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class ACSN {
|
||||
// source: 'abstractCollections.kt'
|
||||
public method <init>(): void
|
||||
public synthetic method add(p0: java.lang.Object): boolean
|
||||
public method add(p0: java.lang.String): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public abstract method contains(p0: java.lang.String): boolean
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class ACT {
|
||||
// source: 'abstractCollections.kt'
|
||||
public method <init>(): void
|
||||
public method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public abstract method contains(p0: java.lang.Object): boolean
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
@kotlin.Metadata
|
||||
public abstract class ACA {
|
||||
// source: 'abstractCollections.kt'
|
||||
public method <init>(): void
|
||||
public method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class ACAN {
|
||||
// source: 'abstractCollections.kt'
|
||||
public method <init>(): void
|
||||
public method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class ACI {
|
||||
// source: 'abstractCollections.kt'
|
||||
public method <init>(): void
|
||||
public method add(p0: int): boolean
|
||||
public synthetic bridge method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public abstract method contains(p0: int): boolean
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class ACIN {
|
||||
// source: 'abstractCollections.kt'
|
||||
public method <init>(): void
|
||||
public method add(p0: java.lang.Integer): boolean
|
||||
public synthetic bridge method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public abstract method contains(p0: java.lang.Integer): boolean
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class ACS {
|
||||
// source: 'abstractCollections.kt'
|
||||
public method <init>(): void
|
||||
public synthetic bridge method add(p0: java.lang.Object): boolean
|
||||
public method add(p0: java.lang.String): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public abstract method contains(p0: java.lang.String): boolean
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class ACSN {
|
||||
// source: 'abstractCollections.kt'
|
||||
public method <init>(): void
|
||||
public synthetic bridge method add(p0: java.lang.Object): boolean
|
||||
public method add(p0: java.lang.String): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public abstract method contains(p0: java.lang.String): boolean
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class ACT {
|
||||
// source: 'abstractCollections.kt'
|
||||
public method <init>(): void
|
||||
public method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
abstract class AIA : Iterable<Any>
|
||||
|
||||
abstract class AIAN : Iterable<Any?>
|
||||
|
||||
abstract class AII : Iterable<Int>
|
||||
|
||||
abstract class AIIN : Iterable<Int?>
|
||||
|
||||
abstract class AIS : Iterable<String>
|
||||
|
||||
abstract class AISN : Iterable<String?>
|
||||
|
||||
abstract class AIT<T> : Iterable<T>
|
||||
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
@kotlin.Metadata
|
||||
public abstract class AIA {
|
||||
// source: 'abstractIterables.kt'
|
||||
public method <init>(): void
|
||||
public method iterator(): java.util.Iterator
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class AIAN {
|
||||
// source: 'abstractIterables.kt'
|
||||
public method <init>(): void
|
||||
public method iterator(): java.util.Iterator
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class AII {
|
||||
// source: 'abstractIterables.kt'
|
||||
public method <init>(): void
|
||||
public method iterator(): java.util.Iterator
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class AIIN {
|
||||
// source: 'abstractIterables.kt'
|
||||
public method <init>(): void
|
||||
public method iterator(): java.util.Iterator
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class AIS {
|
||||
// source: 'abstractIterables.kt'
|
||||
public method <init>(): void
|
||||
public method iterator(): java.util.Iterator
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class AISN {
|
||||
// source: 'abstractIterables.kt'
|
||||
public method <init>(): void
|
||||
public method iterator(): java.util.Iterator
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class AIT {
|
||||
// source: 'abstractIterables.kt'
|
||||
public method <init>(): void
|
||||
public method iterator(): java.util.Iterator
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
abstract class ASA : Set<Any>
|
||||
|
||||
abstract class ASAN : Set<Any?>
|
||||
|
||||
abstract class ASI : Set<Int>
|
||||
|
||||
abstract class ASIN : Set<Int?>
|
||||
|
||||
abstract class ASS : Set<String>
|
||||
|
||||
abstract class ASSN : Set<String?>
|
||||
|
||||
abstract class AST<T> : Set<T>
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
@kotlin.Metadata
|
||||
public abstract class ASA {
|
||||
// source: 'abstractSets.kt'
|
||||
public method <init>(): void
|
||||
public method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public abstract method contains(p0: java.lang.Object): boolean
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class ASAN {
|
||||
// source: 'abstractSets.kt'
|
||||
public method <init>(): void
|
||||
public method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public abstract method contains(p0: java.lang.Object): boolean
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class ASI {
|
||||
// source: 'abstractSets.kt'
|
||||
public method <init>(): void
|
||||
public method add(p0: int): boolean
|
||||
public synthetic method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public abstract method contains(p0: int): boolean
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class ASIN {
|
||||
// source: 'abstractSets.kt'
|
||||
public method <init>(): void
|
||||
public method add(p0: java.lang.Integer): boolean
|
||||
public synthetic method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public abstract method contains(p0: java.lang.Integer): boolean
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class ASS {
|
||||
// source: 'abstractSets.kt'
|
||||
public method <init>(): void
|
||||
public synthetic method add(p0: java.lang.Object): boolean
|
||||
public method add(p0: java.lang.String): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public abstract method contains(p0: java.lang.String): boolean
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class ASSN {
|
||||
// source: 'abstractSets.kt'
|
||||
public method <init>(): void
|
||||
public synthetic method add(p0: java.lang.Object): boolean
|
||||
public method add(p0: java.lang.String): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public abstract method contains(p0: java.lang.String): boolean
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class AST {
|
||||
// source: 'abstractSets.kt'
|
||||
public method <init>(): void
|
||||
public method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public abstract method contains(p0: java.lang.Object): boolean
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
+130
@@ -0,0 +1,130 @@
|
||||
@kotlin.Metadata
|
||||
public abstract class ASA {
|
||||
// source: 'abstractSets.kt'
|
||||
public method <init>(): void
|
||||
public method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class ASAN {
|
||||
// source: 'abstractSets.kt'
|
||||
public method <init>(): void
|
||||
public method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class ASI {
|
||||
// source: 'abstractSets.kt'
|
||||
public method <init>(): void
|
||||
public method add(p0: int): boolean
|
||||
public synthetic bridge method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public abstract method contains(p0: int): boolean
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class ASIN {
|
||||
// source: 'abstractSets.kt'
|
||||
public method <init>(): void
|
||||
public method add(p0: java.lang.Integer): boolean
|
||||
public synthetic bridge method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public abstract method contains(p0: java.lang.Integer): boolean
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class ASS {
|
||||
// source: 'abstractSets.kt'
|
||||
public method <init>(): void
|
||||
public synthetic bridge method add(p0: java.lang.Object): boolean
|
||||
public method add(p0: java.lang.String): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public abstract method contains(p0: java.lang.String): boolean
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class ASSN {
|
||||
// source: 'abstractSets.kt'
|
||||
public method <init>(): void
|
||||
public synthetic bridge method add(p0: java.lang.Object): boolean
|
||||
public method add(p0: java.lang.String): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public bridge final method contains(p0: java.lang.Object): boolean
|
||||
public abstract method contains(p0: java.lang.String): boolean
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public abstract class AST {
|
||||
// source: 'abstractSets.kt'
|
||||
public method <init>(): void
|
||||
public method add(p0: java.lang.Object): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public abstract method getSize(): int
|
||||
public method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public bridge final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
+5
@@ -5058,6 +5058,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/collections/removeClashKotlin.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("removeClashWithGenerics.kt")
|
||||
public void testRemoveClashWithGenerics() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/collections/removeClashWithGenerics.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("removeOverriddenInJava.kt")
|
||||
public void testRemoveOverriddenInJava() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/collections/removeOverriddenInJava.kt");
|
||||
|
||||
+60
@@ -229,11 +229,56 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/collectionStubs"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
@TestMetadata("customListIterator.kt")
|
||||
public void testCustomListIterator() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/customListIterator.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("customMutableListIterator.kt")
|
||||
public void testCustomMutableListIterator() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/customMutableListIterator.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noStubsForCollection.kt")
|
||||
public void testNoStubsForCollection() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsForCollection.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noStubsForMapImplementations.kt")
|
||||
public void testNoStubsForMapImplementations() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsForMapImplementations.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noStubsForMutableSetIterators.kt")
|
||||
public void testNoStubsForMutableSetIterators() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsForMutableSetIterators.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noStubsForSetIterators.kt")
|
||||
public void testNoStubsForSetIterators() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsForSetIterators.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noStubsInIterable.kt")
|
||||
public void testNoStubsInIterable() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsInIterable.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noStubsInJavaSuperClass.kt")
|
||||
public void testNoStubsInJavaSuperClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsInJavaSuperClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noStubsInMutableIterable.kt")
|
||||
public void testNoStubsInMutableIterable() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsInMutableIterable.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("observableMutableMap.kt")
|
||||
public void testObservableMutableMap() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/observableMutableMap.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stubsFromSuperclass.kt")
|
||||
public void testStubsFromSuperclass() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclass.kt");
|
||||
@@ -794,6 +839,16 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
|
||||
KotlinTestUtils.runTest(this::doTest, this, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("abstractCollections.kt")
|
||||
public void testAbstractCollections() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/specialBridges/abstractCollections.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("abstractIterables.kt")
|
||||
public void testAbstractIterables() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/specialBridges/abstractIterables.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("abstractLists.kt")
|
||||
public void testAbstractLists() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/specialBridges/abstractLists.kt");
|
||||
@@ -809,6 +864,11 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/specialBridges/abstractMutableLists.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("abstractSets.kt")
|
||||
public void testAbstractSets() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/specialBridges/abstractSets.kt");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInSpecialBridges() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/specialBridges"), Pattern.compile("^(.+)\\.kt$"), null, true);
|
||||
}
|
||||
|
||||
+5
@@ -5058,6 +5058,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/collections/removeClashKotlin.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("removeClashWithGenerics.kt")
|
||||
public void testRemoveClashWithGenerics() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/collections/removeClashWithGenerics.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("removeOverriddenInJava.kt")
|
||||
public void testRemoveOverriddenInJava() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/collections/removeOverriddenInJava.kt");
|
||||
|
||||
+5
@@ -5028,6 +5028,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/collections/removeClashKotlin.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("removeClashWithGenerics.kt")
|
||||
public void testRemoveClashWithGenerics() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/collections/removeClashWithGenerics.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("removeOverriddenInJava.kt")
|
||||
public void testRemoveOverriddenInJava() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/collections/removeOverriddenInJava.kt");
|
||||
|
||||
+60
@@ -229,11 +229,56 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/collectionStubs"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
@TestMetadata("customListIterator.kt")
|
||||
public void testCustomListIterator() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/customListIterator.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("customMutableListIterator.kt")
|
||||
public void testCustomMutableListIterator() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/customMutableListIterator.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noStubsForCollection.kt")
|
||||
public void testNoStubsForCollection() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsForCollection.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noStubsForMapImplementations.kt")
|
||||
public void testNoStubsForMapImplementations() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsForMapImplementations.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noStubsForMutableSetIterators.kt")
|
||||
public void testNoStubsForMutableSetIterators() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsForMutableSetIterators.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noStubsForSetIterators.kt")
|
||||
public void testNoStubsForSetIterators() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsForSetIterators.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noStubsInIterable.kt")
|
||||
public void testNoStubsInIterable() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsInIterable.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noStubsInJavaSuperClass.kt")
|
||||
public void testNoStubsInJavaSuperClass() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsInJavaSuperClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noStubsInMutableIterable.kt")
|
||||
public void testNoStubsInMutableIterable() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/noStubsInMutableIterable.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("observableMutableMap.kt")
|
||||
public void testObservableMutableMap() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/observableMutableMap.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("stubsFromSuperclass.kt")
|
||||
public void testStubsFromSuperclass() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/collectionStubs/stubsFromSuperclass.kt");
|
||||
@@ -764,6 +809,16 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||
}
|
||||
|
||||
@TestMetadata("abstractCollections.kt")
|
||||
public void testAbstractCollections() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/specialBridges/abstractCollections.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("abstractIterables.kt")
|
||||
public void testAbstractIterables() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/specialBridges/abstractIterables.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("abstractLists.kt")
|
||||
public void testAbstractLists() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/specialBridges/abstractLists.kt");
|
||||
@@ -779,6 +834,11 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
|
||||
runTest("compiler/testData/codegen/bytecodeListing/specialBridges/abstractMutableLists.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("abstractSets.kt")
|
||||
public void testAbstractSets() throws Exception {
|
||||
runTest("compiler/testData/codegen/bytecodeListing/specialBridges/abstractSets.kt");
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInSpecialBridges() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/bytecodeListing/specialBridges"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user