diff --git a/analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/MutableList.pretty.txt b/analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/MutableList.pretty.txt index 0ba2aa83343..5c41d1473c8 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/MutableList.pretty.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/MutableList.pretty.txt @@ -24,22 +24,22 @@ operator fun set(index: kotlin.Int, element: E): E fun subList(fromIndex: kotlin.Int, toIndex: kotlin.Int): kotlin.collections.MutableList +val size: kotlin.Int + +fun isEmpty(): kotlin.Boolean + operator fun contains(element: E): kotlin.Boolean +operator fun iterator(): kotlin.collections.MutableIterator + fun containsAll(elements: kotlin.collections.Collection): kotlin.Boolean operator fun get(index: kotlin.Int): E fun indexOf(element: E): kotlin.Int -fun isEmpty(): kotlin.Boolean - -operator fun iterator(): kotlin.collections.MutableIterator - fun lastIndexOf(element: E): kotlin.Int -val size: kotlin.Int - open operator fun equals(other: kotlin.Any?): kotlin.Boolean open fun hashCode(): kotlin.Int diff --git a/analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/MutableList.txt b/analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/MutableList.txt index 207c04965e5..8a1d0c4734f 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/MutableList.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/MutableList.txt @@ -855,6 +855,105 @@ KtFunctionSymbol: getContainingModule: KtBinaryModule "Builtins for JVM (1.8)" deprecationStatus: null +KtKotlinPropertySymbol: + annotationsList: [] + backingFieldSymbol: KtBackingFieldSymbol: + annotationsList: [] + callableIdIfNonLocal: null + contextReceivers: [] + isExtension: false + name: field + origin: PROPERTY_BACKING_FIELD + owningProperty: KtKotlinPropertySymbol(kotlin/collections/List.size) + receiverParameter: null + returnType: KtUsualClassType: + annotationsList: [] + ownTypeArguments: [] + type: kotlin/Int + symbolKind: LOCAL + typeParameters: [] + getContainingModule: KtBinaryModule "Builtins for JVM (1.8)" + deprecationStatus: null + callableIdIfNonLocal: kotlin/collections/List.size + contextReceivers: [] + getter: null + hasBackingField: false + hasGetter: false + hasSetter: false + initializer: null + isConst: false + isDelegatedProperty: false + isExtension: false + isFromPrimaryConstructor: false + isLateInit: false + isOverride: false + isStatic: false + isVal: true + modality: ABSTRACT + name: size + origin: LIBRARY + receiverParameter: null + returnType: KtUsualClassType: + annotationsList: [] + ownTypeArguments: [] + type: kotlin/Int + setter: null + symbolKind: CLASS_MEMBER + typeParameters: [] + visibility: Public + getDispatchReceiver(): KtUsualClassType: + annotationsList: [] + ownTypeArguments: [ + KtTypeParameterType: + annotationsList: [] + type: E + ] + type: kotlin/collections/List + getContainingModule: KtBinaryModule "Builtins for JVM (1.8)" + deprecationStatus: null + getterDeprecationStatus: null + javaGetterName: getSize + javaSetterName: null + setterDeprecationStatus: null + +KtFunctionSymbol: + annotationsList: [] + callableIdIfNonLocal: kotlin/collections/List.isEmpty + contextReceivers: [] + contractEffects: [] + hasStableParameterNames: true + isBuiltinFunctionInvoke: false + isExtension: false + isExternal: false + isInfix: false + isInline: false + isOperator: false + isOverride: false + isStatic: false + isSuspend: false + modality: ABSTRACT + name: isEmpty + origin: LIBRARY + receiverParameter: null + returnType: KtUsualClassType: + annotationsList: [] + ownTypeArguments: [] + type: kotlin/Boolean + symbolKind: CLASS_MEMBER + typeParameters: [] + valueParameters: [] + visibility: Public + getDispatchReceiver(): KtUsualClassType: + annotationsList: [] + ownTypeArguments: [ + KtTypeParameterType: + annotationsList: [] + type: E + ] + type: kotlin/collections/List + getContainingModule: KtBinaryModule "Builtins for JVM (1.8)" + deprecationStatus: null + KtFunctionSymbol: annotationsList: [] callableIdIfNonLocal: kotlin/collections/MutableList.contains @@ -915,6 +1014,48 @@ KtFunctionSymbol: getContainingModule: KtBinaryModule "Builtins for JVM (1.8)" deprecationStatus: null +KtFunctionSymbol: + annotationsList: [] + callableIdIfNonLocal: kotlin/collections/MutableList.iterator + contextReceivers: [] + contractEffects: [] + hasStableParameterNames: true + isBuiltinFunctionInvoke: false + isExtension: false + isExternal: false + isInfix: false + isInline: false + isOperator: true + isOverride: false + isStatic: false + isSuspend: false + modality: ABSTRACT + name: iterator + origin: INTERSECTION_OVERRIDE + receiverParameter: null + returnType: KtUsualClassType: + annotationsList: [] + ownTypeArguments: [ + KtTypeParameterType: + annotationsList: [] + type: E + ] + type: kotlin/collections/MutableIterator + symbolKind: CLASS_MEMBER + typeParameters: [] + valueParameters: [] + visibility: Public + getDispatchReceiver(): KtUsualClassType: + annotationsList: [] + ownTypeArguments: [ + KtTypeParameterType: + annotationsList: [] + type: E + ] + type: kotlin/collections/MutableList + getContainingModule: KtBinaryModule "Builtins for JVM (1.8)" + deprecationStatus: null + KtFunctionSymbol: annotationsList: [] callableIdIfNonLocal: kotlin/collections/MutableList.containsAll @@ -1100,86 +1241,6 @@ KtFunctionSymbol: getContainingModule: KtBinaryModule "Builtins for JVM (1.8)" deprecationStatus: null -KtFunctionSymbol: - annotationsList: [] - callableIdIfNonLocal: kotlin/collections/List.isEmpty - contextReceivers: [] - contractEffects: [] - hasStableParameterNames: true - isBuiltinFunctionInvoke: false - isExtension: false - isExternal: false - isInfix: false - isInline: false - isOperator: false - isOverride: false - isStatic: false - isSuspend: false - modality: ABSTRACT - name: isEmpty - origin: LIBRARY - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Boolean - symbolKind: CLASS_MEMBER - typeParameters: [] - valueParameters: [] - visibility: Public - getDispatchReceiver(): KtUsualClassType: - annotationsList: [] - ownTypeArguments: [ - KtTypeParameterType: - annotationsList: [] - type: E - ] - type: kotlin/collections/List - getContainingModule: KtBinaryModule "Builtins for JVM (1.8)" - deprecationStatus: null - -KtFunctionSymbol: - annotationsList: [] - callableIdIfNonLocal: kotlin/collections/MutableList.iterator - contextReceivers: [] - contractEffects: [] - hasStableParameterNames: true - isBuiltinFunctionInvoke: false - isExtension: false - isExternal: false - isInfix: false - isInline: false - isOperator: true - isOverride: false - isStatic: false - isSuspend: false - modality: ABSTRACT - name: iterator - origin: INTERSECTION_OVERRIDE - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [ - KtTypeParameterType: - annotationsList: [] - type: E - ] - type: kotlin/collections/MutableIterator - symbolKind: CLASS_MEMBER - typeParameters: [] - valueParameters: [] - visibility: Public - getDispatchReceiver(): KtUsualClassType: - annotationsList: [] - ownTypeArguments: [ - KtTypeParameterType: - annotationsList: [] - type: E - ] - type: kotlin/collections/MutableList - getContainingModule: KtBinaryModule "Builtins for JVM (1.8)" - deprecationStatus: null - KtFunctionSymbol: annotationsList: [] callableIdIfNonLocal: kotlin/collections/MutableList.lastIndexOf @@ -1240,67 +1301,6 @@ KtFunctionSymbol: getContainingModule: KtBinaryModule "Builtins for JVM (1.8)" deprecationStatus: null -KtKotlinPropertySymbol: - annotationsList: [] - backingFieldSymbol: KtBackingFieldSymbol: - annotationsList: [] - callableIdIfNonLocal: null - contextReceivers: [] - isExtension: false - name: field - origin: PROPERTY_BACKING_FIELD - owningProperty: KtKotlinPropertySymbol(kotlin/collections/List.size) - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Int - symbolKind: LOCAL - typeParameters: [] - getContainingModule: KtBinaryModule "Builtins for JVM (1.8)" - deprecationStatus: null - callableIdIfNonLocal: kotlin/collections/List.size - contextReceivers: [] - getter: null - hasBackingField: false - hasGetter: false - hasSetter: false - initializer: null - isConst: false - isDelegatedProperty: false - isExtension: false - isFromPrimaryConstructor: false - isLateInit: false - isOverride: false - isStatic: false - isVal: true - modality: ABSTRACT - name: size - origin: LIBRARY - receiverParameter: null - returnType: KtUsualClassType: - annotationsList: [] - ownTypeArguments: [] - type: kotlin/Int - setter: null - symbolKind: CLASS_MEMBER - typeParameters: [] - visibility: Public - getDispatchReceiver(): KtUsualClassType: - annotationsList: [] - ownTypeArguments: [ - KtTypeParameterType: - annotationsList: [] - type: E - ] - type: kotlin/collections/List - getContainingModule: KtBinaryModule "Builtins for JVM (1.8)" - deprecationStatus: null - getterDeprecationStatus: null - javaGetterName: getSize - javaSetterName: null - setterDeprecationStatus: null - KtFunctionSymbol: annotationsList: [] callableIdIfNonLocal: kotlin/Any.equals diff --git a/analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/enumEntry.pretty.txt b/analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/enumEntry.pretty.txt index f4f16442aec..a7e2b78f330 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/enumEntry.pretty.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/enumEntry.pretty.txt @@ -13,4 +13,8 @@ open fun toString(): kotlin.String @kotlin.internal.IntrinsicConstEvaluation val name: kotlin.String -val ordinal: kotlin.Int \ No newline at end of file +val ordinal: kotlin.Int + +fun getDeclaringClass(): (java.lang.Class..java.lang.Class?) + +fun finalize() diff --git a/analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/enumEntry.txt b/analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/enumEntry.txt index 0303ceb8c3b..8920a0cc431 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/enumEntry.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/memberScopeByFqName/enumEntry.txt @@ -436,4 +436,75 @@ KtKotlinPropertySymbol: getterDeprecationStatus: null javaGetterName: getOrdinal javaSetterName: null - setterDeprecationStatus: null \ No newline at end of file + setterDeprecationStatus: null + +KtFunctionSymbol: + annotationsList: [] + callableIdIfNonLocal: test/E.getDeclaringClass + contextReceivers: [] + contractEffects: [] + hasStableParameterNames: false + isBuiltinFunctionInvoke: false + isExtension: false + isExternal: false + isInfix: false + isInline: false + isOperator: false + isOverride: false + isStatic: false + isSuspend: false + modality: FINAL + name: getDeclaringClass + origin: SUBSTITUTION_OVERRIDE + receiverParameter: null + returnType: KtFlexibleType: + annotationsList: [] + type: ft, java/lang/Class?> + symbolKind: CLASS_MEMBER + typeParameters: [] + valueParameters: [] + visibility: Public + getDispatchReceiver(): KtUsualClassType: + annotationsList: [] + ownTypeArguments: [] + type: test/E + getContainingModule: KtSourceModule "Sources of main" + deprecationStatus: null + +KtFunctionSymbol: + annotationsList: [] + callableIdIfNonLocal: kotlin/Enum.finalize + contextReceivers: [] + contractEffects: [] + hasStableParameterNames: false + isBuiltinFunctionInvoke: false + isExtension: false + isExternal: false + isInfix: false + isInline: false + isOperator: false + isOverride: false + isStatic: false + isSuspend: false + modality: FINAL + name: finalize + origin: JAVA + receiverParameter: null + returnType: KtUsualClassType: + annotationsList: [] + ownTypeArguments: [] + type: kotlin/Unit + symbolKind: CLASS_MEMBER + typeParameters: [] + valueParameters: [] + visibility: ProtectedAndPackage + getDispatchReceiver(): KtUsualClassType: + annotationsList: [] + ownTypeArguments: [ + KtTypeParameterType: + annotationsList: [] + type: E + ] + type: kotlin/Enum + getContainingModule: KtBinaryModule "Builtins for JVM (1.8)" + deprecationStatus: null diff --git a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/enumEntry.pretty.txt b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/enumEntry.pretty.txt index 102edd43142..a22dde04d76 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/enumEntry.pretty.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/enumEntry.pretty.txt @@ -14,7 +14,7 @@ scopes: SimpleTypeScope, index = 2 classifiers: 1 companion object - callables: 9 + callables: 11 val x: kotlin.String fun foo() fun clone(): kotlin.Any @@ -24,6 +24,8 @@ scopes: fun toString(): kotlin.String val name: kotlin.String val ordinal: kotlin.Int + fun getDeclaringClass(): java.lang.Class? + fun finalize() StaticMemberScope, index = 3 classifiers: 0 diff --git a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/enumEntry.txt b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/enumEntry.txt index 72d2441ed95..0ae5af1887e 100644 --- a/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/enumEntry.txt +++ b/analysis/analysis-api/testData/components/scopeProvider/scopeContextForPosition/enumEntry.txt @@ -42,7 +42,7 @@ scopes: symbolKind: CLASS_MEMBER typeParameters: [] visibility: Public - callables: 9 + callables: 11 KtKotlinPropertySymbol: annotationsList: [] backingFieldSymbol: KtBackingFieldSymbol: @@ -402,6 +402,59 @@ scopes: symbolKind: CLASS_MEMBER typeParameters: [] visibility: Public + KtFunctionSymbol: + annotationsList: [] + callableIdIfNonLocal: /E.getDeclaringClass + contextReceivers: [] + contractEffects: [] + hasStableParameterNames: false + isBuiltinFunctionInvoke: false + isExtension: false + isExternal: false + isInfix: false + isInline: false + isOperator: false + isOverride: false + isStatic: false + isSuspend: false + modality: FINAL + name: getDeclaringClass + origin: SUBSTITUTION_OVERRIDE + receiverParameter: null + returnType: KtFlexibleType: + annotationsList: [] + type: ft, java/lang/Class?> + symbolKind: CLASS_MEMBER + typeParameters: [] + valueParameters: [] + visibility: Public + KtFunctionSymbol: + annotationsList: [] + callableIdIfNonLocal: kotlin/Enum.finalize + contextReceivers: [] + contractEffects: [] + hasStableParameterNames: false + isBuiltinFunctionInvoke: false + isExtension: false + isExternal: false + isInfix: false + isInline: false + isOperator: false + isOverride: false + isStatic: false + isSuspend: false + modality: FINAL + name: finalize + origin: JAVA + receiverParameter: null + returnType: KtUsualClassType: + annotationsList: [] + ownTypeArguments: [] + type: kotlin/Unit + symbolKind: CLASS_MEMBER + typeParameters: [] + valueParameters: [] + visibility: ProtectedAndPackage StaticMemberScope, index = 3 classifiers: 0 diff --git a/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/session/FirCommonSessionFactory.kt b/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/session/FirCommonSessionFactory.kt index 5ca45463996..77bd2cd6e61 100644 --- a/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/session/FirCommonSessionFactory.kt +++ b/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/session/FirCommonSessionFactory.kt @@ -55,7 +55,7 @@ object FirCommonSessionFactory : FirAbstractSessionFactory() { registerExtraComponents = { registerExtraComponents(it) }, - createKotlinScopeProvider = { FirKotlinScopeProvider { _, declaredMemberScope, _, _, _ -> declaredMemberScope } }, + createKotlinScopeProvider = { FirKotlinScopeProvider() }, createProviders = { session, builtinsModuleData, kotlinScopeProvider -> listOfNotNull( MetadataSymbolProvider( @@ -109,7 +109,7 @@ object FirCommonSessionFactory : FirAbstractSessionFactory() { registerExtraComponents(it) }, registerExtraCheckers = {}, - createKotlinScopeProvider = { FirKotlinScopeProvider { _, declaredMemberScope, _, _, _ -> declaredMemberScope } }, + createKotlinScopeProvider = { FirKotlinScopeProvider() }, createProviders = { session, kotlinScopeProvider, symbolProvider, syntheticFunctionalInterfaceProvider, generatedSymbolsProvider, dependencies -> var symbolProviderForBinariesFromIncrementalCompilation: MetadataSymbolProvider? = null incrementalCompilationContext?.let { diff --git a/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/session/FirJsSessionFactory.kt b/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/session/FirJsSessionFactory.kt index b2fa1d57057..0aefedb5764 100644 --- a/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/session/FirJsSessionFactory.kt +++ b/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/session/FirJsSessionFactory.kt @@ -53,7 +53,7 @@ object FirJsSessionFactory : FirAbstractSessionFactory() { registerExtraComponents(session) }, registerExtraCheckers = { it.registerJsCheckers() }, - createKotlinScopeProvider = { FirKotlinScopeProvider { _, declaredMemberScope, _, _, _ -> declaredMemberScope } }, + createKotlinScopeProvider = { FirKotlinScopeProvider() }, createProviders = { session, kotlinScopeProvider, symbolProvider, generatedSymbolsProvider, syntheticFunctionInterfaceProvider, dependencies -> listOfNotNull( symbolProvider, @@ -91,7 +91,7 @@ object FirJsSessionFactory : FirAbstractSessionFactory() { it.registerJsSpecificComponents() registerExtraComponents(it) }, - createKotlinScopeProvider = { FirKotlinScopeProvider { _, declaredMemberScope, _, _, _ -> declaredMemberScope } }, + createKotlinScopeProvider = { FirKotlinScopeProvider() }, createProviders = { session, builtinsModuleData, kotlinScopeProvider -> listOfNotNull( KlibBasedSymbolProvider(session, moduleDataProvider, kotlinScopeProvider, resolvedLibraries), diff --git a/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/session/FirNativeSessionFactory.kt b/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/session/FirNativeSessionFactory.kt index d57e9c72a9c..f74de2679de 100644 --- a/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/session/FirNativeSessionFactory.kt +++ b/compiler/fir/entrypoint/src/org/jetbrains/kotlin/fir/session/FirNativeSessionFactory.kt @@ -41,7 +41,7 @@ object FirNativeSessionFactory : FirAbstractSessionFactory() { registerExtraComponents = { session -> registerExtraComponents(session) }, - createKotlinScopeProvider = { FirKotlinScopeProvider { _, declaredMemberScope, _, _, _ -> declaredMemberScope } }, + createKotlinScopeProvider = { FirKotlinScopeProvider() }, createProviders = { session, builtinsModuleData, kotlinScopeProvider -> val forwardDeclarationsModuleData = BinaryModuleData.createDependencyModuleData( Name.special(""), @@ -86,7 +86,7 @@ object FirNativeSessionFactory : FirAbstractSessionFactory() { registerExtraComponents(it) }, registerExtraCheckers = { it.registerNativeCheckers() }, - createKotlinScopeProvider = { FirKotlinScopeProvider { _, declaredMemberScope, _, _, _ -> declaredMemberScope } }, + createKotlinScopeProvider = { FirKotlinScopeProvider() }, createProviders = { _, _, symbolProvider, generatedSymbolsProvider, syntheticFunctionInterfaceProvider, dependencies -> listOfNotNull( symbolProvider, diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/resolve/scopes/JvmMappedScopes.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/resolve/scopes/JvmMappedScopes.kt index 4c52578b664..157da54b0d1 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/resolve/scopes/JvmMappedScopes.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/resolve/scopes/JvmMappedScopes.kt @@ -12,18 +12,10 @@ import org.jetbrains.kotlin.fir.declarations.FirRegularClass import org.jetbrains.kotlin.fir.declarations.FirResolvePhase import org.jetbrains.kotlin.fir.declarations.utils.classId import org.jetbrains.kotlin.fir.resolve.ScopeSession -import org.jetbrains.kotlin.fir.resolve.createSubstitutionForScope -import org.jetbrains.kotlin.fir.resolve.defaultType import org.jetbrains.kotlin.fir.resolve.providers.symbolProvider -import org.jetbrains.kotlin.fir.resolve.scopeSessionKey -import org.jetbrains.kotlin.fir.resolve.substitution.substitutorByMap import org.jetbrains.kotlin.fir.scopes.FirContainingNamesAwareScope -import org.jetbrains.kotlin.fir.scopes.FirTypeScope -import org.jetbrains.kotlin.fir.scopes.impl.FirClassSubstitutionScope import org.jetbrains.kotlin.fir.scopes.jvm.JvmMappedScope -import org.jetbrains.kotlin.fir.scopes.platformClassMapper import org.jetbrains.kotlin.fir.scopes.unsubstitutedScope -import org.jetbrains.kotlin.fir.symbols.impl.FirClassSymbol fun wrapScopeWithJvmMapped( klass: FirClass, @@ -32,6 +24,7 @@ fun wrapScopeWithJvmMapped( scopeSession: ScopeSession, memberRequiredPhase: FirResolvePhase?, ): FirContainingNamesAwareScope { + if (klass !is FirRegularClass) return declaredMemberScope val classId = klass.classId val kotlinUnsafeFqName = classId.asSingleFqName().toUnsafe() val javaClassId = JavaToKotlinClassMap.mapKotlinToJava(kotlinUnsafeFqName) @@ -41,59 +34,21 @@ fun wrapScopeWithJvmMapped( ?: return declaredMemberScope val preparedSignatures = JvmMappedScope.prepareSignatures(javaClass, JavaToKotlinClassMap.isMutable(kotlinUnsafeFqName)) return if (preparedSignatures.isNotEmpty()) { - javaClass.unsubstitutedScope( + val javaClassUseSiteScope = javaClass.unsubstitutedScope( useSiteSession, scopeSession, withForcedTypeCalculator = false, memberRequiredPhase = memberRequiredPhase, - ).let { javaClassUseSiteScope -> - val jvmMappedScope = JvmMappedScope( - useSiteSession, - klass, - javaClass, - declaredMemberScope, - javaClassUseSiteScope, - preparedSignatures - ) - if (klass !is FirRegularClass) { - jvmMappedScope - } else { - // We should substitute Java type parameters with base Kotlin type parameters to match overrides properly - // It's necessary for MutableMap, which has *two* JavaMappedScope inside (one for itself and another for base Map) - wrapSubstitutionScopeIfNeed( - useSiteSession, jvmMappedScope, klass, scopeSession, - derivedClass = klass, - ) - } - } + ) + JvmMappedScope( + useSiteSession, + klass, + javaClass, + declaredMemberScope, + javaClassUseSiteScope, + preparedSignatures, + ) } else { declaredMemberScope } } - -private fun wrapSubstitutionScopeIfNeed( - session: FirSession, - useSiteMemberScope: FirTypeScope, - declaration: FirClass, - builder: ScopeSession, - derivedClass: FirRegularClass -): FirTypeScope { - if (declaration.typeParameters.isEmpty()) return useSiteMemberScope - return builder.getOrBuild(declaration.symbol, PLATFORM_TYPE_PARAMETERS_SUBSTITUTION_SCOPE_KEY) { - val platformClass = session.platformClassMapper.getCorrespondingPlatformClass(declaration) ?: return@getOrBuild useSiteMemberScope - // This kind of substitution is necessary when method which is mapped from Java (e.g. Java Map.forEach) - // is called on an external type, like MyMap, - // to determine parameter types properly (e.g. String, String instead of K, V) - val platformTypeParameters = platformClass.typeParameters - val platformSubstitution = createSubstitutionForScope(platformTypeParameters, declaration.defaultType(), session) - val substitutor = substitutorByMap(platformSubstitution, session) - FirClassSubstitutionScope( - session, useSiteMemberScope, PLATFORM_TYPE_PARAMETERS_SUBSTITUTION_SCOPE_KEY, substitutor, - dispatchReceiverTypeForSubstitutedMembers = derivedClass.defaultType(), - skipPrivateMembers = true, - derivedClassLookupTag = derivedClass.symbol.toLookupTag() - ) - } -} - -private val PLATFORM_TYPE_PARAMETERS_SUBSTITUTION_SCOPE_KEY = scopeSessionKey, FirTypeScope>() diff --git a/compiler/fir/java/src/org/jetbrains/kotlin/fir/scopes/jvm/JvmMappedScope.kt b/compiler/fir/java/src/org/jetbrains/kotlin/fir/scopes/jvm/JvmMappedScope.kt index a96bb794dfa..6e596ef1066 100644 --- a/compiler/fir/java/src/org/jetbrains/kotlin/fir/scopes/jvm/JvmMappedScope.kt +++ b/compiler/fir/java/src/org/jetbrains/kotlin/fir/scopes/jvm/JvmMappedScope.kt @@ -5,36 +5,50 @@ package org.jetbrains.kotlin.fir.scopes.jvm +import org.jetbrains.kotlin.builtins.jvm.JavaToKotlinClassMap import org.jetbrains.kotlin.builtins.jvm.JvmBuiltInsSignatures import org.jetbrains.kotlin.fir.FirSession -import org.jetbrains.kotlin.fir.declarations.FirClass -import org.jetbrains.kotlin.fir.declarations.FirConstructor -import org.jetbrains.kotlin.fir.declarations.FirRegularClass -import org.jetbrains.kotlin.fir.declarations.constructors +import org.jetbrains.kotlin.fir.containingClassLookupTag +import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.declarations.utils.classId +import org.jetbrains.kotlin.fir.declarations.utils.isFinal +import org.jetbrains.kotlin.fir.dispatchReceiverClassLookupTagOrNull +import org.jetbrains.kotlin.fir.isSubstitutionOrIntersectionOverride import org.jetbrains.kotlin.fir.resolve.defaultType +import org.jetbrains.kotlin.fir.resolve.lookupSuperTypes +import org.jetbrains.kotlin.fir.resolve.providers.symbolProvider import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutor import org.jetbrains.kotlin.fir.resolve.substitution.ConeSubstitutorByMap -import org.jetbrains.kotlin.fir.scopes.FirContainingNamesAwareScope -import org.jetbrains.kotlin.fir.scopes.FirTypeScope -import org.jetbrains.kotlin.fir.scopes.ProcessorAction +import org.jetbrains.kotlin.fir.scopes.* import org.jetbrains.kotlin.fir.scopes.impl.FirFakeOverrideGenerator import org.jetbrains.kotlin.fir.scopes.impl.FirStandardOverrideChecker import org.jetbrains.kotlin.fir.scopes.impl.buildSubstitutorForOverridesCheck +import org.jetbrains.kotlin.fir.scopes.impl.declaredMemberScope import org.jetbrains.kotlin.fir.symbols.ConeTypeParameterLookupTag import org.jetbrains.kotlin.fir.symbols.impl.* import org.jetbrains.kotlin.fir.types.coneType import org.jetbrains.kotlin.fir.types.impl.ConeTypeParameterTypeImpl +import org.jetbrains.kotlin.load.java.BuiltinSpecialProperties +import org.jetbrains.kotlin.load.java.SpecialGenericSignatures +import org.jetbrains.kotlin.load.java.getPropertyNamesCandidatesByAccessorName +import org.jetbrains.kotlin.load.kotlin.SignatureBuildingComponents import org.jetbrains.kotlin.name.CallableId +import org.jetbrains.kotlin.name.ClassId import org.jetbrains.kotlin.name.Name +/** + * @param firKotlinClass Kotlin version of built-in class mapped to some JDK class (e.g. kotlin.collections.List) + * @param firJavaClass JDK version of some built-in class (e.g. java.util.List) + * @param declaredMemberScope basic/common declared scope (without any additional members) of a Kotlin version + * @param javaMappedClassUseSiteScope use-site scope of JDK class + */ class JvmMappedScope( private val session: FirSession, - private val firKotlinClass: FirClass, - firJavaClass: FirRegularClass, + private val firKotlinClass: FirRegularClass, + private val firJavaClass: FirRegularClass, private val declaredMemberScope: FirContainingNamesAwareScope, private val javaMappedClassUseSiteScope: FirTypeScope, - private val signatures: Signatures + private val signatures: Signatures, ) : FirTypeScope() { private val functionsCache = mutableMapOf() @@ -42,43 +56,145 @@ class JvmMappedScope( private val overrideChecker = FirStandardOverrideChecker(session) - private val substitutor = ConeSubstitutorByMap( - firJavaClass.typeParameters.zip(firKotlinClass.typeParameters).associate { (javaParameter, kotlinParameter) -> - javaParameter.symbol to ConeTypeParameterTypeImpl(ConeTypeParameterLookupTag(kotlinParameter.symbol), isNullable = false) - }, - session - ) + private val substitutor = createMappingSubstitutor(firJavaClass, firKotlinClass, session) private val kotlinDispatchReceiverType = firKotlinClass.defaultType() - override fun processFunctionsByName(name: Name, processor: (FirNamedFunctionSymbol) -> Unit) { - val visibleMethods = signatures.visibleMethodSignaturesByName[name] - ?: return declaredMemberScope.processFunctionsByName(name, processor) + private val declaredScopeOfMutableVersion = JavaToKotlinClassMap.readOnlyToMutable(firKotlinClass.classId)?.let { + session.symbolProvider.getClassLikeSymbolByClassId(it) as? FirClassSymbol + }?.let { + session.declaredMemberScope(it, memberRequiredPhase = null) + } + private val isMutableContainer = JavaToKotlinClassMap.isMutable(firKotlinClass.classId) + + private val allJavaMappedSuperClassIds: List by lazy { + buildList { + add(firJavaClass.classId) + lookupSuperTypes(firJavaClass.symbol, lookupInterfaces = true, deep = true, session).mapTo(this) { superType -> + val originalClassId = superType.lookupTag.classId + JavaToKotlinClassMap.mapKotlinToJava(originalClassId.asSingleFqName().toUnsafe()) ?: originalClassId + } + } + } + + override fun processFunctionsByName(name: Name, processor: (FirNamedFunctionSymbol) -> Unit) { val declared = mutableListOf() declaredMemberScope.processFunctionsByName(name) { symbol -> declared += symbol processor(symbol) } - val declaredSignatures by lazy { - declared.mapTo(mutableSetOf()) { it.fir.computeJvmDescriptor() } - } - - javaMappedClassUseSiteScope.processFunctionsByName(name) { symbol -> - val newSymbol = getOrCreateSubstitutedCopy(symbol) - - val jvmSignature = newSymbol.fir.computeJvmDescriptor() - if (jvmSignature in visibleMethods && jvmSignature !in declaredSignatures) { - processor(newSymbol) + val declaredSignatures: Set by lazy { + buildSet { + declared.mapTo(this) { it.fir.computeJvmDescriptor() } + declaredScopeOfMutableVersion?.processFunctionsByName(name) { + add(it.fir.computeJvmDescriptor()) + } } } + + javaMappedClassUseSiteScope.processFunctionsByName(name) processor@{ symbol -> + if (!symbol.isDeclaredInMappedJavaClass() || !(symbol.fir.status as FirResolvedDeclarationStatus).visibility.isPublicAPI) { + return@processor + } + + val jvmDescriptor = symbol.fir.computeJvmDescriptor() + // We don't need adding what is already declared + if (jvmDescriptor in declaredSignatures) return@processor + + // That condition means that the member is already declared in the built-in class, but has a non-trivially mapped JVM descriptor + if (isRenamedJdkMethod(jvmDescriptor) || symbol.isOverrideOfKotlinBuiltinPropertyGetter()) return@processor + + // If it's java.lang.List.contains(Object) it being loaded as contains(E) and treated as an override + // of kotlin.collections.Collection.contains(E), thus we're not loading it as an additional JDK member + if (isOverrideOfKotlinDeclaredFunction(symbol)) return@processor + + if (isMutabilityViolation(symbol, jvmDescriptor)) return@processor + + val jdkMemberStatus = getJdkMethodStatus(jvmDescriptor) + + if (jdkMemberStatus == JDKMemberStatus.DROP) return@processor + // hidden methods in final class can't be overridden or called with 'super' + if (jdkMemberStatus == JDKMemberStatus.HIDDEN && firKotlinClass.isFinal) return@processor + + val newSymbol = getOrCreateSubstitutedCopy(symbol, jdkMemberStatus) + processor(newSymbol) + } + } + + private fun isOverrideOfKotlinDeclaredFunction(symbol: FirNamedFunctionSymbol) = + javaMappedClassUseSiteScope.anyOverriddenOf(symbol, ::isDeclaredInBuiltinClass) + + private fun isMutabilityViolation(symbol: FirNamedFunctionSymbol, jvmDescriptor: String): Boolean { + val signature = SignatureBuildingComponents.signature(firJavaClass.classId, jvmDescriptor) + val isAmongMutableSignatures = signature in JvmBuiltInsSignatures.MUTABLE_METHOD_SIGNATURES + // If the method belongs to MUTABLE_METHOD_SIGNATURES, but the class is a read-only collection we shouldn't add it. + // For example, we don't want j.u.Collection.removeIf would got to read-only kotlin.collections.Collection + // But if the method is not among MUTABLE_METHOD_SIGNATURES, but the class is a mutable version, we skip it too, + // because it has already been added to the read-only version from which we inherit it. + // For example, we don't need regular j.u.Collection.stream was duplicated in MutableCollection + // as it's already present in the read-only version. + if (isAmongMutableSignatures != isMutableContainer) return true + + return javaMappedClassUseSiteScope.anyOverriddenOf(symbol) { + !it.isSubstitutionOrIntersectionOverride && it.containingClassLookupTag()?.classId?.let(JavaToKotlinClassMap::isMutable) == true + } + } + + private fun FirNamedFunctionSymbol.isOverrideOfKotlinBuiltinPropertyGetter(): Boolean { + val fqName = firJavaClass.classId.asSingleFqName().child(name) + if (valueParameterSymbols.isEmpty()) { + if (fqName in BuiltinSpecialProperties.GETTER_FQ_NAMES) return true + if (getPropertyNamesCandidatesByAccessorName(name).any(::isTherePropertyWithNameInKotlinClass)) return true + } + + return false + } + + // j/l/Number.intValue(), j/u/Collection.remove(I), etc. + private fun isRenamedJdkMethod(jvmDescriptor: String): Boolean { + val signature = SignatureBuildingComponents.signature(firJavaClass.classId, jvmDescriptor) + return signature in SpecialGenericSignatures.JVM_SIGNATURES_FOR_RENAMED_BUILT_INS + } + + private fun isTherePropertyWithNameInKotlinClass(name: Name): Boolean { + if (name !in declaredMemberScope.getCallableNames()) return false + + return declaredMemberScope.getProperties(name).isNotEmpty() + } + + // Mostly, what this function checks is if the member was serialized to built-ins, but not loaded from JDK. + // Currently, we use FirDeclarationOrigin.Library for all deserialized members, including built-in ones. + // Another implementation might be `it.origin != FirDeclarationOrigin.Enhancement`, but that shouldn't really matter. + private fun isDeclaredInBuiltinClass(it: FirNamedFunctionSymbol) = + it.origin == FirDeclarationOrigin.Library + + private fun FirNamedFunctionSymbol.isDeclaredInMappedJavaClass(): Boolean { + return !fir.isSubstitutionOrIntersectionOverride && fir.dispatchReceiverClassLookupTagOrNull() == firJavaClass.symbol.toLookupTag() + } + + private fun getJdkMethodStatus(jvmDescriptor: String): JDKMemberStatus { + for (classId in allJavaMappedSuperClassIds) { + when (SignatureBuildingComponents.signature(classId, jvmDescriptor)) { + in JvmBuiltInsSignatures.HIDDEN_METHOD_SIGNATURES -> return JDKMemberStatus.HIDDEN + in JvmBuiltInsSignatures.VISIBLE_METHOD_SIGNATURES -> return JDKMemberStatus.VISIBLE + in JvmBuiltInsSignatures.DROP_LIST_METHOD_SIGNATURES -> return JDKMemberStatus.DROP + } + } + + // For unknown methods, we use HIDDEN policy by default + return JDKMemberStatus.HIDDEN + } + + private enum class JDKMemberStatus { + HIDDEN, VISIBLE, DROP } override fun processPropertiesByName(name: Name, processor: (FirVariableSymbol<*>) -> Unit) { declaredMemberScope.processPropertiesByName(name, processor) } - private fun getOrCreateSubstitutedCopy(symbol: FirNamedFunctionSymbol): FirNamedFunctionSymbol { + private fun getOrCreateSubstitutedCopy(symbol: FirNamedFunctionSymbol, jdkMemberStatus: JDKMemberStatus): FirNamedFunctionSymbol { return functionsCache.getOrPut(symbol) { val oldFunction = symbol.fir val newSymbol = FirNamedFunctionSymbol(CallableId(firKotlinClass.classId, symbol.callableId.callableName)) @@ -90,8 +206,12 @@ class JvmMappedScope( symbol.fir.origin, newDispatchReceiverType = kotlinDispatchReceiverType, newParameterTypes = oldFunction.valueParameters.map { substitutor.substituteOrSelf(it.returnTypeRef.coneType) }, - newReturnType = substitutor.substituteOrSelf(oldFunction.returnTypeRef.coneType) - ) + newReturnType = substitutor.substituteOrSelf(oldFunction.returnTypeRef.coneType), + ).apply { + if (jdkMemberStatus == JDKMemberStatus.HIDDEN) { + isHiddenEverywhereBesideSuperCalls = true + } + } newSymbol } } @@ -175,7 +295,8 @@ class JvmMappedScope( } override fun getCallableNames(): Set { - return declaredMemberScope.getCallableNames() + signatures.visibleMethodSignaturesByName.keys + // It's ok to return a super set of actually available member names + return declaredMemberScope.getCallableNames() + javaMappedClassUseSiteScope.getCallableNames() } override fun getClassifierNames(): Set { @@ -243,6 +364,21 @@ class JvmMappedScope( return Signatures(visibleMethodsByName, hiddenConstructors) } + + /** + * For fromClass=A, toClass=B classes + * @returns {T1 -> F1, T2 -> F2} substitution + */ + private fun createMappingSubstitutor(fromClass: FirRegularClass, toClass: FirRegularClass, session: FirSession): ConeSubstitutor = + ConeSubstitutorByMap( + fromClass.typeParameters.zip(toClass.typeParameters).associate { (fromTypeParameter, toTypeParameter) -> + fromTypeParameter.symbol to ConeTypeParameterTypeImpl( + ConeTypeParameterLookupTag(toTypeParameter.symbol), + isNullable = false + ) + }, + session + ) } override fun toString(): String { diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/declarations/deprecationUtils.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/declarations/deprecationUtils.kt index 65095b1358c..3fc1e09e4bf 100644 --- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/declarations/deprecationUtils.kt +++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/declarations/deprecationUtils.kt @@ -250,3 +250,9 @@ private fun List.extractDeprecationAnnotationInfoPerUseSite( } } } + +private object IsHiddenEverywhereBesideSuperCalls : FirDeclarationDataKey() + +var FirCallableDeclaration.isHiddenEverywhereBesideSuperCalls: Boolean? by FirDeclarationDataRegistry.data( + IsHiddenEverywhereBesideSuperCalls +) diff --git a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/resolve/calls/Synthetics.kt b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/resolve/calls/Synthetics.kt index af98d2016bd..0bbfa63df12 100644 --- a/compiler/fir/providers/src/org/jetbrains/kotlin/fir/resolve/calls/Synthetics.kt +++ b/compiler/fir/providers/src/org/jetbrains/kotlin/fir/resolve/calls/Synthetics.kt @@ -9,6 +9,7 @@ import org.jetbrains.kotlin.fir.* import org.jetbrains.kotlin.fir.declarations.FirDeclarationOrigin import org.jetbrains.kotlin.fir.declarations.FirSimpleFunction import org.jetbrains.kotlin.fir.declarations.getDeprecationsProviderFromAccessors +import org.jetbrains.kotlin.fir.declarations.isHiddenEverywhereBesideSuperCalls import org.jetbrains.kotlin.fir.declarations.synthetic.FirSyntheticProperty import org.jetbrains.kotlin.fir.declarations.synthetic.buildSyntheticProperty import org.jetbrains.kotlin.fir.declarations.utils.isStatic @@ -123,7 +124,8 @@ class FirSyntheticPropertiesScope private constructor( // And it doesn't make sense to make a synthetic property for `void` typed getters if (getterReturnType?.isUnit == true && CompilerConeAttributes.EnhancedNullability !in getterReturnType.attributes) return - if (!getterSymbol.hasJavaOverridden()) return + // Should have Java among overridden _and_ don't have isHiddenEverywhereBesideSuperCalls among them + if (!getterSymbol.mayBeUsedAsGetterForSyntheticProperty()) return var matchingSetter: FirSimpleFunction? = null if (needCheckForSetter && getterReturnType != null) { @@ -231,17 +233,22 @@ class FirSyntheticPropertiesScope private constructor( || processOverrides(getterSymbol, setterSymbolToCompare = setterSymbol) } - private fun FirNamedFunctionSymbol.hasJavaOverridden(): Boolean { + private fun FirNamedFunctionSymbol.mayBeUsedAsGetterForSyntheticProperty(): Boolean { var result = false + var isHiddenEverywhereBesideSuperCalls = false baseScope.processOverriddenFunctionsAndSelf(this) { - if (it.unwrapFakeOverrides().fir.origin == FirDeclarationOrigin.Enhancement) { + val unwrapped = it.unwrapFakeOverrides().fir + if (unwrapped.origin == FirDeclarationOrigin.Enhancement) { result = true - ProcessorAction.STOP - } else { - ProcessorAction.NEXT } + + if (unwrapped.isHiddenEverywhereBesideSuperCalls == true) { + isHiddenEverywhereBesideSuperCalls = true + } + + ProcessorAction.NEXT } - return result + return result && !isHiddenEverywhereBesideSuperCalls } } diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/ResolutionStages.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/ResolutionStages.kt index aa4b7683fbc..8fd8401c70d 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/ResolutionStages.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/ResolutionStages.kt @@ -8,6 +8,7 @@ package org.jetbrains.kotlin.fir.resolve.calls import org.jetbrains.kotlin.KtFakeSourceElementKind import org.jetbrains.kotlin.config.LanguageFeature import org.jetbrains.kotlin.descriptors.Modality +import org.jetbrains.kotlin.fir.FirElement import org.jetbrains.kotlin.fir.declarations.* import org.jetbrains.kotlin.fir.declarations.utils.isInfix import org.jetbrains.kotlin.fir.declarations.utils.isOperator @@ -24,10 +25,7 @@ import org.jetbrains.kotlin.fir.resolve.inference.csBuilder import org.jetbrains.kotlin.fir.resolve.inference.hasBuilderInferenceAnnotation import org.jetbrains.kotlin.fir.resolve.inference.model.ConeExplicitTypeParameterConstraintPosition import org.jetbrains.kotlin.fir.resolve.toSymbol -import org.jetbrains.kotlin.fir.scopes.FirTypeScope -import org.jetbrains.kotlin.fir.scopes.FirUnstableSmartcastTypeScope -import org.jetbrains.kotlin.fir.scopes.ProcessorAction -import org.jetbrains.kotlin.fir.scopes.processOverriddenFunctions +import org.jetbrains.kotlin.fir.scopes.* import org.jetbrains.kotlin.fir.symbols.SyntheticSymbol import org.jetbrains.kotlin.fir.symbols.impl.* import org.jetbrains.kotlin.fir.symbols.lazyResolveToPhase @@ -656,10 +654,26 @@ internal object CheckDeprecatedSinceKotlin : ResolutionStage() { override suspend fun check(candidate: Candidate, callInfo: CallInfo, sink: CheckerSink, context: ResolutionContext) { val symbol = candidate.symbol as? FirCallableSymbol<*> ?: return val deprecation = symbol.getDeprecation(context.session, callInfo.callSite) - if (deprecation != null && deprecation.deprecationLevel == DeprecationLevelValue.HIDDEN) { + if (deprecation?.deprecationLevel == DeprecationLevelValue.HIDDEN || isHiddenForThisCallSite(symbol, callInfo, candidate)) { sink.yieldDiagnostic(HiddenCandidate) } } + + private fun isHiddenForThisCallSite( + symbol: FirCallableSymbol<*>, + callInfo: CallInfo, + candidate: Candidate, + ): Boolean { + if (callInfo.callSite.isSuperCall()) return false + if (symbol.fir.dispatchReceiverType == null || symbol !is FirNamedFunctionSymbol) return false + if (symbol.fir.isHiddenEverywhereBesideSuperCalls == true) return true + + val scope = candidate.originScope as? FirTypeScope ?: return false + return scope.getDirectOverriddenFunctions(symbol).any { it.fir.isHiddenEverywhereBesideSuperCalls == true } + } + + private fun FirElement.isSuperCall(): Boolean = + this is FirQualifiedAccessExpression && explicitReceiver?.calleeReference is FirSuperReference } private val DYNAMIC_EXTENSION_ANNOTATION_CLASS_ID: ClassId = ClassId.topLevel(DYNAMIC_EXTENSION_FQ_NAME) diff --git a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/scopes/FirTypeScope.kt b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/scopes/FirTypeScope.kt index afe83358046..0494e8acf5f 100644 --- a/compiler/fir/tree/src/org/jetbrains/kotlin/fir/scopes/FirTypeScope.kt +++ b/compiler/fir/tree/src/org/jetbrains/kotlin/fir/scopes/FirTypeScope.kt @@ -91,6 +91,23 @@ fun FirTypeScope.processOverriddenFunctions( mutableSetOf() ) +fun FirTypeScope.anyOverriddenOf( + functionSymbol: FirNamedFunctionSymbol, + predicate: (FirNamedFunctionSymbol) -> Boolean +): Boolean { + var result = false + processOverriddenFunctions(functionSymbol) { + if (predicate(it)) { + result = true + return@processOverriddenFunctions ProcessorAction.STOP + } + + return@processOverriddenFunctions ProcessorAction.NEXT + } + + return result +} + private fun FirTypeScope.processOverriddenFunctionsWithVisited( functionSymbol: FirNamedFunctionSymbol, visited: MutableSet>, diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/ListAndSet.kt b/compiler/testData/codegen/bytecodeListing/collectionStubs/ListAndSet.kt index 212710bf95c..b2c1f1bbe3e 100644 --- a/compiler/testData/codegen/bytecodeListing/collectionStubs/ListAndSet.kt +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/ListAndSet.kt @@ -1,9 +1,6 @@ // WITH_STDLIB // FULL_JDK -// IGNORE_BACKEND_K2: JVM_IR -// FIR status: KT-57269 K2: collection stub for `sort` is not generated for custom List subclasses - import java.util.* class ListSet : List, Set { diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2WithFullJdk.kt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2WithFullJdk.kt index 41af041ccee..23f09563f4a 100644 --- a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2WithFullJdk.kt +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation2WithFullJdk.kt @@ -1,8 +1,5 @@ // FULL_JDK -// IGNORE_BACKEND_K2: JVM_IR -// FIR status: KT-57269 K2: collection stub for `sort` is not generated for custom List subclasses - class DStringIterator(d: Iterator) : Iterator by d class DStringListIterator(d: ListIterator) : ListIterator by d diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3WithFullJdk.kt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3WithFullJdk.kt index 21ce8575030..2f456adaec0 100644 --- a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3WithFullJdk.kt +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegation3WithFullJdk.kt @@ -1,9 +1,6 @@ // FULL_JDK // See also: https://youtrack.jetbrains.com/issue/KT-42330 -// IGNORE_BACKEND_K2: JVM_IR -// FIR status: KT-57269 K2: collection stub for `sort` is not generated for custom List subclasses - class DIntIterator(d: Iterator) : Iterator by d class DIntListIterator(d: ListIterator) : ListIterator by d diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegationWithFullJdk.kt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegationWithFullJdk.kt index 7b24895bc82..2defb72814e 100644 --- a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegationWithFullJdk.kt +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionByDelegationWithFullJdk.kt @@ -1,8 +1,5 @@ // FULL_JDK -// IGNORE_BACKEND_K2: JVM_IR -// FIR status: KT-57269 K2: collection stub for `sort` is not generated for custom List subclasses - class DGenericIterator(d: Iterator) : Iterator by d class DGenericListIterator(d: ListIterator) : ListIterator by d diff --git a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionsWithFullJdk.kt b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionsWithFullJdk.kt index 971f0874427..16c9e12cd5f 100644 --- a/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionsWithFullJdk.kt +++ b/compiler/testData/codegen/bytecodeListing/collectionStubs/collectionsWithFullJdk.kt @@ -1,9 +1,6 @@ // FULL_JDK // See: KT-42114, KT-42115 -// IGNORE_BACKEND_K2: JVM_IR -// FIR status: KT-57269 K2: collection stub for `sort` is not generated for custom List subclasses - abstract class AbstractIterator : Iterator abstract class AbstractIterable : Iterable diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.fir.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.fir.kt deleted file mode 100644 index 8bc20f758b1..00000000000 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.fir.kt +++ /dev/null @@ -1,6 +0,0 @@ -enum class E { - ENTRY; - - fun getDeclaringClass() {} - fun finalize() {} -} diff --git a/compiler/testData/diagnostics/tests/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.kt b/compiler/testData/diagnostics/tests/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.kt index d333d24e91d..609ba57c374 100644 --- a/compiler/testData/diagnostics/tests/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.kt +++ b/compiler/testData/diagnostics/tests/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL enum class E { ENTRY; diff --git a/compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/finalize.fir.kt b/compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/finalize.fir.kt deleted file mode 100644 index 914bf45c411..00000000000 --- a/compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/finalize.fir.kt +++ /dev/null @@ -1,10 +0,0 @@ -enum class TestEnum { - ENTRY; - - fun getDeclaringClass() {} - fun finalize() {} -} - -class TestFinalize { - fun finalize() {} -} diff --git a/compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/finalize.kt b/compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/finalize.kt index c9992a275ce..9c22d29b7c6 100644 --- a/compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/finalize.kt +++ b/compiler/testData/diagnostics/tests/targetedBuiltIns/backwardCompatibility/finalize.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL enum class TestEnum { ENTRY; diff --git a/compiler/testData/diagnostics/tests/testWithModifiedMockJdk/notConsideredMethod.fir.kt b/compiler/testData/diagnostics/tests/testWithModifiedMockJdk/notConsideredMethod.fir.kt index 795cc0e5d0d..88b6690bb22 100644 --- a/compiler/testData/diagnostics/tests/testWithModifiedMockJdk/notConsideredMethod.fir.kt +++ b/compiler/testData/diagnostics/tests/testWithModifiedMockJdk/notConsideredMethod.fir.kt @@ -3,11 +3,11 @@ interface A : MutableCollection { // Override of deprecated function could be marked as deprecated too - override fun nonExistingMethod(x: String) = "" + override fun nonExistingMethod(x: String) = "" } fun foo(x: MutableCollection, y: Collection, z: A) { - x.nonExistingMethod(1).checkType { _() } + x.nonExistingMethod(1).checkType { _() } y.nonExistingMethod("") - z.nonExistingMethod("") + z.nonExistingMethod("") } diff --git a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.fir.kt b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.fir.kt index 8bc20f758b1..ac2fc315d6e 100644 --- a/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.fir.kt +++ b/compiler/testData/diagnostics/testsWithJvmBackend/duplicateJvmSignature/finalMembersFromBuiltIns/enumMembers.fir.kt @@ -1,6 +1,6 @@ enum class E { ENTRY; - fun getDeclaringClass() {} - fun finalize() {} + fun getDeclaringClass() {} + fun finalize() {} } diff --git a/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/blackListed.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/blackListed.fir.kt deleted file mode 100644 index 1d1bd1f39a2..00000000000 --- a/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/blackListed.fir.kt +++ /dev/null @@ -1,21 +0,0 @@ -// FULL_JDK - -abstract class A : MutableList { - override fun sort(/*0*/ p0: java.util.Comparator) { - super.sort(p0) - } -} - -fun foo(x: MutableList, y: java.util.ArrayList, z: A, p: java.util.Comparator) { - x.sort(p) - y.sort(p) - - z.sort(p) -} - -fun bar(x: MutableList, y: java.util.ArrayList, z: A) { - x.sort { a, b -> a.length - b.length } - y.sort { a, b -> a.length - b.length } - - z.sort { a, b -> a.length - b.length } -} diff --git a/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/blackListed.kt b/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/blackListed.kt index 45bb362072c..7f1326203f3 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/blackListed.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/targetedBuiltIns/blackListed.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // FULL_JDK abstract class A : MutableList { diff --git a/compiler/testData/ir/irText/classes/classes.fir.ir.txt b/compiler/testData/ir/irText/classes/classes.fir.ir.txt index cdaa8e1a69d..5b9c583addc 100644 --- a/compiler/testData/ir/irText/classes/classes.fir.ir.txt +++ b/compiler/testData/ir/irText/classes/classes.fir.ir.txt @@ -127,3 +127,11 @@ FILE fqName: fileName:/classes.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestEnumClass?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum diff --git a/compiler/testData/ir/irText/classes/enum.fir.ir.txt b/compiler/testData/ir/irText/classes/enum.fir.ir.txt index 7a9055138ae..51b523f152d 100644 --- a/compiler/testData/ir/irText/classes/enum.fir.ir.txt +++ b/compiler/testData/ir/irText/classes/enum.fir.ir.txt @@ -61,6 +61,14 @@ FILE fqName: fileName:/enum.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestEnum1?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum CLASS ENUM_CLASS name:TestEnum2 modality:FINAL visibility:public superTypes:[kotlin.Enum<.TestEnum2>] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum2 CONSTRUCTOR visibility:private <> (x:kotlin.Int) returnType:.TestEnum2 [primary] @@ -141,6 +149,14 @@ FILE fqName: fileName:/enum.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestEnum2?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum CLASS ENUM_CLASS name:TestEnum3 modality:ABSTRACT visibility:public superTypes:[kotlin.Enum<.TestEnum3>] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum3 CONSTRUCTOR visibility:private <> () returnType:.TestEnum3 [primary] @@ -204,6 +220,14 @@ FILE fqName: fileName:/enum.kt overridden: public final fun (): kotlin.Int [fake_override] declared in .TestEnum3 $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestEnum3?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestEnum3?>? [fake_override] declared in .TestEnum3 + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit [fake_override] declared in .TestEnum3 + $this: VALUE_PARAMETER name: type:kotlin.Enum FUN name:foo visibility:public modality:ABSTRACT <> ($this:.TestEnum3) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.TestEnum3 FUN ENUM_CLASS_SPECIAL_MEMBER name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<.TestEnum3> @@ -255,6 +279,14 @@ FILE fqName: fileName:/enum.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestEnum3?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum CLASS ENUM_CLASS name:TestEnum4 modality:ABSTRACT visibility:public superTypes:[kotlin.Enum<.TestEnum4>] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum4 CONSTRUCTOR visibility:private <> (x:kotlin.Int) returnType:.TestEnum4 [primary] @@ -339,6 +371,14 @@ FILE fqName: fileName:/enum.kt overridden: public final fun (): kotlin.Int [fake_override] declared in .TestEnum4 $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestEnum4?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestEnum4?>? [fake_override] declared in .TestEnum4 + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit [fake_override] declared in .TestEnum4 + $this: VALUE_PARAMETER name: type:kotlin.Enum ENUM_ENTRY name:TEST2 init: EXPRESSION_BODY ENUM_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .TestEnum4.TEST2' @@ -419,6 +459,14 @@ FILE fqName: fileName:/enum.kt overridden: public final fun (): kotlin.Int [fake_override] declared in .TestEnum4 $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestEnum4?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestEnum4?>? [fake_override] declared in .TestEnum4 + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit [fake_override] declared in .TestEnum4 + $this: VALUE_PARAMETER name: type:kotlin.Enum FUN name:foo visibility:public modality:ABSTRACT <> ($this:.TestEnum4) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.TestEnum4 FUN ENUM_CLASS_SPECIAL_MEMBER name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<.TestEnum4> @@ -470,6 +518,14 @@ FILE fqName: fileName:/enum.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestEnum4?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum CLASS ENUM_CLASS name:TestEnum5 modality:FINAL visibility:public superTypes:[kotlin.Enum<.TestEnum5>] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestEnum5 CONSTRUCTOR visibility:private <> (x:kotlin.Int) returnType:.TestEnum5 [primary] @@ -550,6 +606,14 @@ FILE fqName: fileName:/enum.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestEnum5?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum FUN name:f visibility:public modality:FINAL <> () returnType:kotlin.Int BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun f (): kotlin.Int declared in ' @@ -644,3 +708,11 @@ FILE fqName: fileName:/enum.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestEnum6?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum diff --git a/compiler/testData/ir/irText/classes/enumClassModality.fir.ir.txt b/compiler/testData/ir/irText/classes/enumClassModality.fir.ir.txt index 83331625d81..53e7303bfeb 100644 --- a/compiler/testData/ir/irText/classes/enumClassModality.fir.ir.txt +++ b/compiler/testData/ir/irText/classes/enumClassModality.fir.ir.txt @@ -58,6 +58,14 @@ FILE fqName: fileName:/enumClassModality.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestFinalEnum1?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum CLASS ENUM_CLASS name:TestFinalEnum2 modality:FINAL visibility:public superTypes:[kotlin.Enum<.TestFinalEnum2>] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestFinalEnum2 CONSTRUCTOR visibility:private <> (x:kotlin.Int) returnType:.TestFinalEnum2 [primary] @@ -130,6 +138,14 @@ FILE fqName: fileName:/enumClassModality.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestFinalEnum2?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum CLASS ENUM_CLASS name:TestFinalEnum3 modality:FINAL visibility:public superTypes:[kotlin.Enum<.TestFinalEnum3>] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestFinalEnum3 CONSTRUCTOR visibility:private <> () returnType:.TestFinalEnum3 [primary] @@ -192,6 +208,14 @@ FILE fqName: fileName:/enumClassModality.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestFinalEnum3?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum CLASS ENUM_CLASS name:TestOpenEnum1 modality:OPEN visibility:public superTypes:[kotlin.Enum<.TestOpenEnum1>] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestOpenEnum1 CONSTRUCTOR visibility:private <> () returnType:.TestOpenEnum1 [primary] @@ -251,6 +275,14 @@ FILE fqName: fileName:/enumClassModality.kt overridden: public final fun (): kotlin.Int [fake_override] declared in .TestOpenEnum1 $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestOpenEnum1?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestOpenEnum1?>? [fake_override] declared in .TestOpenEnum1 + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit [fake_override] declared in .TestOpenEnum1 + $this: VALUE_PARAMETER name: type:kotlin.Enum FUN ENUM_CLASS_SPECIAL_MEMBER name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<.TestOpenEnum1> SYNTHETIC_BODY kind=ENUM_VALUES FUN ENUM_CLASS_SPECIAL_MEMBER name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:.TestOpenEnum1 @@ -300,6 +332,14 @@ FILE fqName: fileName:/enumClassModality.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestOpenEnum1?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum CLASS ENUM_CLASS name:TestOpenEnum2 modality:OPEN visibility:public superTypes:[kotlin.Enum<.TestOpenEnum2>] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestOpenEnum2 CONSTRUCTOR visibility:private <> () returnType:.TestOpenEnum2 [primary] @@ -361,6 +401,14 @@ FILE fqName: fileName:/enumClassModality.kt overridden: public final fun (): kotlin.Int [fake_override] declared in .TestOpenEnum2 $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestOpenEnum2?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestOpenEnum2?>? [fake_override] declared in .TestOpenEnum2 + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit [fake_override] declared in .TestOpenEnum2 + $this: VALUE_PARAMETER name: type:kotlin.Enum FUN name:foo visibility:public modality:OPEN <> ($this:.TestOpenEnum2) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.TestOpenEnum2 BLOCK_BODY @@ -413,6 +461,14 @@ FILE fqName: fileName:/enumClassModality.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestOpenEnum2?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum CLASS ENUM_CLASS name:TestAbstractEnum1 modality:ABSTRACT visibility:public superTypes:[kotlin.Enum<.TestAbstractEnum1>] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAbstractEnum1 CONSTRUCTOR visibility:private <> () returnType:.TestAbstractEnum1 [primary] @@ -474,6 +530,14 @@ FILE fqName: fileName:/enumClassModality.kt overridden: public final fun (): kotlin.Int [fake_override] declared in .TestAbstractEnum1 $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestAbstractEnum1?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestAbstractEnum1?>? [fake_override] declared in .TestAbstractEnum1 + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit [fake_override] declared in .TestAbstractEnum1 + $this: VALUE_PARAMETER name: type:kotlin.Enum FUN name:foo visibility:public modality:ABSTRACT <> ($this:.TestAbstractEnum1) returnType:kotlin.Unit $this: VALUE_PARAMETER name: type:.TestAbstractEnum1 FUN ENUM_CLASS_SPECIAL_MEMBER name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<.TestAbstractEnum1> @@ -525,6 +589,14 @@ FILE fqName: fileName:/enumClassModality.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestAbstractEnum1?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum CLASS INTERFACE name:IFoo modality:ABSTRACT visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.IFoo FUN name:foo visibility:public modality:ABSTRACT <> ($this:.IFoo) returnType:kotlin.Unit @@ -603,6 +675,14 @@ FILE fqName: fileName:/enumClassModality.kt overridden: public final fun (): kotlin.Int [fake_override] declared in .TestAbstractEnum2 $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestAbstractEnum2?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestAbstractEnum2?>? [fake_override] declared in .TestAbstractEnum2 + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit [fake_override] declared in .TestAbstractEnum2 + $this: VALUE_PARAMETER name: type:kotlin.Enum FUN ENUM_CLASS_SPECIAL_MEMBER name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<.TestAbstractEnum2> SYNTHETIC_BODY kind=ENUM_VALUES FUN ENUM_CLASS_SPECIAL_MEMBER name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:.TestAbstractEnum2 @@ -656,3 +736,11 @@ FILE fqName: fileName:/enumClassModality.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestAbstractEnum2?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum diff --git a/compiler/testData/ir/irText/classes/enumEntries.fir.ir.txt b/compiler/testData/ir/irText/classes/enumEntries.fir.ir.txt index a9ee3927fd1..9be3e1a0f9c 100644 --- a/compiler/testData/ir/irText/classes/enumEntries.fir.ir.txt +++ b/compiler/testData/ir/irText/classes/enumEntries.fir.ir.txt @@ -61,6 +61,14 @@ FILE fqName: fileName:/enumEntries.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .MyEnum?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.enums.EnumEntries<.MyEnum> annotations: OptIn(markerClass = [CLASS_REFERENCE 'CLASS IR_EXTERNAL_DECLARATION_STUB ANNOTATION_CLASS name:ExperimentalStdlibApi modality:FINAL visibility:public superTypes:[kotlin.Annotation]' type=kotlin.reflect.KClass]) diff --git a/compiler/testData/ir/irText/classes/enumWithMultipleCtors.fir.ir.txt b/compiler/testData/ir/irText/classes/enumWithMultipleCtors.fir.ir.txt index 67fbf6466f5..7d5e7387f9b 100644 --- a/compiler/testData/ir/irText/classes/enumWithMultipleCtors.fir.ir.txt +++ b/compiler/testData/ir/irText/classes/enumWithMultipleCtors.fir.ir.txt @@ -94,6 +94,14 @@ FILE fqName: fileName:/enumWithMultipleCtors.kt overridden: public final fun (): kotlin.Int [fake_override] declared in .A $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .A?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .A?>? [fake_override] declared in .A + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit [fake_override] declared in .A + $this: VALUE_PARAMETER name: type:kotlin.Enum ENUM_ENTRY name:Z init: EXPRESSION_BODY ENUM_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) declared in .A' @@ -228,3 +236,11 @@ FILE fqName: fileName:/enumWithMultipleCtors.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .A?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum diff --git a/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.fir.ir.txt b/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.fir.ir.txt index efc8fc19cda..6dd917c2ebb 100644 --- a/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.fir.ir.txt +++ b/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.fir.ir.txt @@ -74,6 +74,14 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .Test0?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum CLASS ENUM_CLASS name:Test1 modality:FINAL visibility:public superTypes:[kotlin.Enum<.Test1>] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test1 CONSTRUCTOR visibility:private <> (x:kotlin.Int) returnType:.Test1 [primary] @@ -153,6 +161,14 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .Test1?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum CLASS ENUM_CLASS name:Test2 modality:ABSTRACT visibility:public superTypes:[kotlin.Enum<.Test2>] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Test2 CONSTRUCTOR visibility:private <> (x:kotlin.Int) returnType:.Test2 [primary] @@ -236,6 +252,14 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt overridden: public final fun (): kotlin.Int [fake_override] declared in .Test2 $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .Test2?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .Test2?>? [fake_override] declared in .Test2 + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit [fake_override] declared in .Test2 + $this: VALUE_PARAMETER name: type:kotlin.Enum ENUM_ENTRY name:ONE init: EXPRESSION_BODY ENUM_CONSTRUCTOR_CALL 'private constructor () [primary] declared in .Test2.ONE' @@ -301,6 +325,14 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt overridden: public final fun (): kotlin.Int [fake_override] declared in .Test2 $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .Test2?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .Test2?>? [fake_override] declared in .Test2 + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit [fake_override] declared in .Test2 + $this: VALUE_PARAMETER name: type:kotlin.Enum CONSTRUCTOR visibility:private <> () returnType:.Test2 BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'private constructor (x: kotlin.Int) [primary] declared in .Test2' @@ -356,3 +388,11 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .Test2?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum diff --git a/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.fir.ir.txt b/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.fir.ir.txt index 03d7a8afbf4..e531a674e86 100644 --- a/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.fir.ir.txt @@ -187,6 +187,14 @@ FILE fqName: fileName:/classesWithAnnotations.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestEnum?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum CLASS ANNOTATION_CLASS name:TestAnnotation modality:OPEN visibility:public superTypes:[kotlin.Annotation] annotations: TestAnn(x = 'annotation') diff --git a/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.fir.ir.txt b/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.fir.ir.txt index afa2873a533..9f303610219 100644 --- a/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.fir.ir.txt @@ -104,6 +104,14 @@ FILE fqName: fileName:/enumEntriesWithAnnotations.kt overridden: public final fun (): kotlin.Int [fake_override] declared in .TestEnum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestEnum?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestEnum?>? [fake_override] declared in .TestEnum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit [fake_override] declared in .TestEnum + $this: VALUE_PARAMETER name: type:kotlin.Enum FUN ENUM_CLASS_SPECIAL_MEMBER name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<.TestEnum> SYNTHETIC_BODY kind=ENUM_VALUES FUN ENUM_CLASS_SPECIAL_MEMBER name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:.TestEnum @@ -153,3 +161,11 @@ FILE fqName: fileName:/enumEntriesWithAnnotations.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .TestEnum?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum diff --git a/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.fir.ir.txt b/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.fir.ir.txt index 136eb6683d6..a510c28c734 100644 --- a/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/enumsInAnnotationArguments.fir.ir.txt @@ -67,6 +67,14 @@ FILE fqName: fileName:/enumsInAnnotationArguments.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .En?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum CLASS ANNOTATION_CLASS name:TestAnn modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.TestAnn CONSTRUCTOR visibility:public <> (x:.En) returnType:.TestAnn [primary] diff --git a/compiler/testData/ir/irText/declarations/annotations/javaAnnotationWithSingleArrayArgument.fir.ir.txt b/compiler/testData/ir/irText/declarations/annotations/javaAnnotationWithSingleArrayArgument.fir.ir.txt index d7733ed1303..9060d4836fa 100644 --- a/compiler/testData/ir/irText/declarations/annotations/javaAnnotationWithSingleArrayArgument.fir.ir.txt +++ b/compiler/testData/ir/irText/declarations/annotations/javaAnnotationWithSingleArrayArgument.fir.ir.txt @@ -89,6 +89,14 @@ FILE fqName: fileName:/C.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .E?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum CLASS ANNOTATION_CLASS name:Annos modality:OPEN visibility:public superTypes:[kotlin.Annotation] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.Annos CONSTRUCTOR visibility:public <> (value:kotlin.Array<.Anno>) returnType:.Annos [primary] diff --git a/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass2.ir.txt b/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass2.ir.txt index a81cfd136b4..0ec597c116d 100644 --- a/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass2.ir.txt +++ b/compiler/testData/ir/irText/declarations/multiplatform/expectedEnumClass2.ir.txt @@ -56,6 +56,14 @@ FILE fqName: fileName:/lib.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .MyEnum?>? [expect,fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [expect,fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum Module: main FILE fqName: fileName:/main.kt CLASS ENUM_CLASS name:MyEnum modality:FINAL visibility:public superTypes:[kotlin.Enum<.MyEnum>] @@ -123,3 +131,11 @@ FILE fqName: fileName:/main.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .MyEnum?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum diff --git a/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.fir.ir.txt b/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.fir.ir.txt index 4a3b03c4034..ae7a1d87133 100644 --- a/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.fir.ir.txt @@ -86,6 +86,14 @@ FILE fqName: fileName:/enumEntryAsReceiver.kt overridden: public final fun (): kotlin.Int [fake_override] declared in .X $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .X?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .X?>? [fake_override] declared in .X + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit [fake_override] declared in .X + $this: VALUE_PARAMETER name: type:kotlin.Enum PROPERTY name:value visibility:public modality:ABSTRACT [val] FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:ABSTRACT <> ($this:.X) returnType:kotlin.Function0 correspondingProperty: PROPERTY name:value visibility:public modality:ABSTRACT [val] @@ -139,6 +147,14 @@ FILE fqName: fileName:/enumEntryAsReceiver.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .X?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in ' diff --git a/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.fir.ir.txt b/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.fir.ir.txt index b955d3690a5..d9c2890b100 100644 --- a/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/enumEntryReferenceFromEnumEntryClass.fir.ir.txt @@ -149,6 +149,14 @@ FILE fqName: fileName:/enumEntryReferenceFromEnumEntryClass.kt overridden: public final fun (): kotlin.Int [fake_override] declared in .MyEnum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .MyEnum?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .MyEnum?>? [fake_override] declared in .MyEnum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit [fake_override] declared in .MyEnum + $this: VALUE_PARAMETER name: type:kotlin.Enum FUN ENUM_CLASS_SPECIAL_MEMBER name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<.MyEnum> SYNTHETIC_BODY kind=ENUM_VALUES FUN ENUM_CLASS_SPECIAL_MEMBER name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:.MyEnum @@ -198,3 +206,11 @@ FILE fqName: fileName:/enumEntryReferenceFromEnumEntryClass.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .MyEnum?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum diff --git a/compiler/testData/ir/irText/expressions/exhaustiveWhenElseBranch.fir.ir.txt b/compiler/testData/ir/irText/expressions/exhaustiveWhenElseBranch.fir.ir.txt index 2be1cb39d69..1645d36625f 100644 --- a/compiler/testData/ir/irText/expressions/exhaustiveWhenElseBranch.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/exhaustiveWhenElseBranch.fir.ir.txt @@ -58,6 +58,14 @@ FILE fqName: fileName:/exhaustiveWhenElseBranch.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .A?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum FUN name:testVariableAssignment_throws visibility:public modality:FINAL <> (a:.A) returnType:kotlin.Unit VALUE_PARAMETER name:a index:0 type:.A BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/kt30020.fir.ir.txt b/compiler/testData/ir/irText/expressions/kt30020.fir.ir.txt index 781b351669b..751c96a7f57 100644 --- a/compiler/testData/ir/irText/expressions/kt30020.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/kt30020.fir.ir.txt @@ -196,11 +196,27 @@ FILE fqName: fileName:/kt30020.kt $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList VALUE_PARAMETER name:fromIndex index:0 type:kotlin.Int VALUE_PARAMETER name:toIndex index:1 type:kotlin.Int + PROPERTY FAKE_OVERRIDE name:size visibility:public modality:ABSTRACT [fake_override,val] + overridden: + public abstract size: kotlin.Int [fake_override,val] + FUN FAKE_OVERRIDE name: visibility:public modality:ABSTRACT <> ($this:kotlin.collections.List) returnType:kotlin.Int [fake_override] + correspondingProperty: PROPERTY FAKE_OVERRIDE name:size visibility:public modality:ABSTRACT [fake_override,val] + overridden: + public abstract fun (): kotlin.Int [fake_override] declared in kotlin.collections.MutableList + $this: VALUE_PARAMETER name: type:kotlin.collections.List + FUN FAKE_OVERRIDE name:isEmpty visibility:public modality:ABSTRACT <> ($this:kotlin.collections.List) returnType:kotlin.Boolean [fake_override] + overridden: + public abstract fun isEmpty (): kotlin.Boolean [fake_override] declared in kotlin.collections.MutableList + $this: VALUE_PARAMETER name: type:kotlin.collections.List FUN FAKE_OVERRIDE name:contains visibility:public modality:ABSTRACT <> ($this:kotlin.collections.List, element:kotlin.Int) returnType:kotlin.Boolean [fake_override,operator] overridden: public abstract fun contains (element: E of kotlin.collections.MutableList): kotlin.Boolean [fake_override,operator] declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.List VALUE_PARAMETER name:element index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:iterator visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableCollection) returnType:kotlin.collections.MutableIterator [fake_override,operator] + overridden: + public abstract fun iterator (): kotlin.collections.MutableIterator [fake_override,operator] declared in kotlin.collections.MutableList + $this: VALUE_PARAMETER name: type:kotlin.collections.MutableCollection FUN FAKE_OVERRIDE name:containsAll visibility:public modality:ABSTRACT <> ($this:kotlin.collections.List, elements:kotlin.collections.Collection) returnType:kotlin.Boolean [fake_override] overridden: public abstract fun containsAll (elements: kotlin.collections.Collection): kotlin.Boolean [fake_override] declared in kotlin.collections.MutableList @@ -216,27 +232,11 @@ FILE fqName: fileName:/kt30020.kt public abstract fun indexOf (element: E of kotlin.collections.MutableList): kotlin.Int [fake_override] declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.List VALUE_PARAMETER name:element index:0 type:kotlin.Int - FUN FAKE_OVERRIDE name:isEmpty visibility:public modality:ABSTRACT <> ($this:kotlin.collections.List) returnType:kotlin.Boolean [fake_override] - overridden: - public abstract fun isEmpty (): kotlin.Boolean [fake_override] declared in kotlin.collections.MutableList - $this: VALUE_PARAMETER name: type:kotlin.collections.List - FUN FAKE_OVERRIDE name:iterator visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableCollection) returnType:kotlin.collections.MutableIterator [fake_override,operator] - overridden: - public abstract fun iterator (): kotlin.collections.MutableIterator [fake_override,operator] declared in kotlin.collections.MutableList - $this: VALUE_PARAMETER name: type:kotlin.collections.MutableCollection FUN FAKE_OVERRIDE name:lastIndexOf visibility:public modality:ABSTRACT <> ($this:kotlin.collections.List, element:kotlin.Int) returnType:kotlin.Int [fake_override] overridden: public abstract fun lastIndexOf (element: E of kotlin.collections.MutableList): kotlin.Int [fake_override] declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.List VALUE_PARAMETER name:element index:0 type:kotlin.Int - PROPERTY FAKE_OVERRIDE name:size visibility:public modality:ABSTRACT [fake_override,val] - overridden: - public abstract size: kotlin.Int [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:ABSTRACT <> ($this:kotlin.collections.List) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:size visibility:public modality:ABSTRACT [fake_override,val] - overridden: - public abstract fun (): kotlin.Int [fake_override] declared in kotlin.collections.MutableList - $this: VALUE_PARAMETER name: type:kotlin.collections.List FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.collections.MutableList diff --git a/compiler/testData/ir/irText/expressions/objectAsCallable.fir.ir.txt b/compiler/testData/ir/irText/expressions/objectAsCallable.fir.ir.txt index b3dfc3db634..5181e0be9e4 100644 --- a/compiler/testData/ir/irText/expressions/objectAsCallable.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/objectAsCallable.fir.ir.txt @@ -77,6 +77,14 @@ FILE fqName: fileName:/objectAsCallable.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .En?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum FUN name:invoke visibility:public modality:FINAL <> ($receiver:.A, i:kotlin.Int) returnType:kotlin.Int [operator] $receiver: VALUE_PARAMETER name: type:.A VALUE_PARAMETER name:i index:0 type:kotlin.Int diff --git a/compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.fir.ir.txt b/compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.fir.ir.txt index 39650a9496e..850050bb5a5 100644 --- a/compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/temporaryInEnumEntryInitializer.fir.ir.txt @@ -92,3 +92,11 @@ FILE fqName: fileName:/temporaryInEnumEntryInitializer.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .En?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum diff --git a/compiler/testData/ir/irText/expressions/values.fir.ir.txt b/compiler/testData/ir/irText/expressions/values.fir.ir.txt index 93f843645d6..bf5d99455de 100644 --- a/compiler/testData/ir/irText/expressions/values.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/values.fir.ir.txt @@ -58,6 +58,14 @@ FILE fqName: fileName:/values.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .Enum?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum CLASS OBJECT name:A modality:FINAL visibility:public superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.A CONSTRUCTOR visibility:private <> () returnType:.A [primary] diff --git a/compiler/testData/ir/irText/expressions/whenSmartCastToEnum.fir.ir.txt b/compiler/testData/ir/irText/expressions/whenSmartCastToEnum.fir.ir.txt index 198e7ea4984..8824e18e867 100644 --- a/compiler/testData/ir/irText/expressions/whenSmartCastToEnum.fir.ir.txt +++ b/compiler/testData/ir/irText/expressions/whenSmartCastToEnum.fir.ir.txt @@ -64,6 +64,14 @@ FILE fqName: fileName:/whenSmartCastToEnum.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .En?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit BLOCK_BODY VAR name:r type:kotlin.String [var] diff --git a/compiler/testData/ir/irText/firProblems/AbstractMutableMap.fir.ir.txt b/compiler/testData/ir/irText/firProblems/AbstractMutableMap.fir.ir.txt index a8b1a66b079..3a414576ab7 100644 --- a/compiler/testData/ir/irText/firProblems/AbstractMutableMap.fir.ir.txt +++ b/compiler/testData/ir/irText/firProblems/AbstractMutableMap.fir.ir.txt @@ -69,24 +69,52 @@ FILE fqName: fileName:/AbstractMutableMap.kt overridden: public open fun (): @[FlexibleNullability] @[FlexibleMutability] kotlin.collections.MutableCollection<@[FlexibleNullability] V of kotlin.collections.AbstractMutableMap?>? [fake_override] declared in kotlin.collections.AbstractMutableMap $this: VALUE_PARAMETER name: type:java.util.AbstractMap + PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] + overridden: + public open size: kotlin.Int [fake_override,val] + FUN FAKE_OVERRIDE name: visibility:public modality:OPEN <> ($this:java.util.AbstractMap) returnType:kotlin.Int [fake_override] + correspondingProperty: PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] + overridden: + public open fun (): kotlin.Int [fake_override] declared in kotlin.collections.AbstractMutableMap + $this: VALUE_PARAMETER name: type:java.util.AbstractMap + FUN FAKE_OVERRIDE name:isEmpty visibility:public modality:OPEN <> ($this:java.util.AbstractMap) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun isEmpty (): kotlin.Boolean [fake_override] declared in kotlin.collections.AbstractMutableMap + $this: VALUE_PARAMETER name: type:java.util.AbstractMap + FUN FAKE_OVERRIDE name:containsKey visibility:public modality:OPEN <> ($this:java.util.AbstractMap, p0:@[FlexibleNullability] K of .MyMap?) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun containsKey (p0: @[FlexibleNullability] K of kotlin.collections.AbstractMutableMap?): kotlin.Boolean [fake_override] declared in kotlin.collections.AbstractMutableMap + $this: VALUE_PARAMETER name: type:java.util.AbstractMap + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] K of .MyMap? + FUN FAKE_OVERRIDE name:containsValue visibility:public modality:OPEN <> ($this:java.util.AbstractMap, p0:@[FlexibleNullability] V of .MyMap?) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun containsValue (p0: @[FlexibleNullability] V of kotlin.collections.AbstractMutableMap?): kotlin.Boolean [fake_override] declared in kotlin.collections.AbstractMutableMap + $this: VALUE_PARAMETER name: type:java.util.AbstractMap + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] V of .MyMap? + FUN FAKE_OVERRIDE name:get visibility:public modality:OPEN <> ($this:java.util.AbstractMap, p0:@[FlexibleNullability] K of .MyMap?) returnType:V of .MyMap? [fake_override,operator] + overridden: + public open fun get (p0: @[FlexibleNullability] K of kotlin.collections.AbstractMutableMap?): V of kotlin.collections.AbstractMutableMap? [fake_override,operator] declared in kotlin.collections.AbstractMutableMap + $this: VALUE_PARAMETER name: type:java.util.AbstractMap + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] K of .MyMap? + FUN FAKE_OVERRIDE name:getOrDefault visibility:public modality:OPEN <> ($this:kotlin.collections.Map, key:K of .MyMap, defaultValue:V of .MyMap) returnType:V of .MyMap [fake_override] + annotations: + SinceKotlin(version = '1.1') + PlatformDependent + overridden: + public open fun getOrDefault (key: K of kotlin.collections.AbstractMutableMap, defaultValue: V of kotlin.collections.AbstractMutableMap): V of kotlin.collections.AbstractMutableMap [fake_override] declared in kotlin.collections.AbstractMutableMap + $this: VALUE_PARAMETER name: type:kotlin.collections.Map + VALUE_PARAMETER name:key index:0 type:K of .MyMap + VALUE_PARAMETER name:defaultValue index:1 type:V of .MyMap + FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:kotlin.collections.Map, p0:@[EnhancedNullability] java.util.function.BiConsumer.MyMap, in @[EnhancedNullability] V of .MyMap>) returnType:kotlin.Unit [fake_override] + overridden: + public open fun forEach (p0: @[EnhancedNullability] java.util.function.BiConsumer): kotlin.Unit [fake_override] declared in kotlin.collections.AbstractMutableMap + $this: VALUE_PARAMETER name: type:kotlin.collections.Map + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.BiConsumer.MyMap, in @[EnhancedNullability] V of .MyMap> FUN FAKE_OVERRIDE name:replaceAll visibility:public modality:OPEN <> ($this:kotlin.collections.MutableMap, p0:@[EnhancedNullability] java.util.function.BiFunction.MyMap, in @[EnhancedNullability] V of .MyMap, out @[EnhancedNullability] V of .MyMap>) returnType:kotlin.Unit [fake_override] overridden: public open fun replaceAll (p0: @[EnhancedNullability] java.util.function.BiFunction): kotlin.Unit [fake_override] declared in kotlin.collections.AbstractMutableMap $this: VALUE_PARAMETER name: type:kotlin.collections.MutableMap VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.BiFunction.MyMap, in @[EnhancedNullability] V of .MyMap, out @[EnhancedNullability] V of .MyMap> - FUN FAKE_OVERRIDE name:merge visibility:public modality:OPEN <> ($this:kotlin.collections.MutableMap, p0:@[EnhancedNullability] K of .MyMap, p1:@[EnhancedNullability] {V of .MyMap & Any}, p2:@[EnhancedNullability] java.util.function.BiFunction.MyMap, in @[EnhancedNullability] V of .MyMap, out V of .MyMap?>) returnType:V of .MyMap? [fake_override] - overridden: - public open fun merge (p0: @[EnhancedNullability] K of kotlin.collections.AbstractMutableMap, p1: @[EnhancedNullability] {V of kotlin.collections.AbstractMutableMap & Any}, p2: @[EnhancedNullability] java.util.function.BiFunction): V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap - $this: VALUE_PARAMETER name: type:kotlin.collections.MutableMap - VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] K of .MyMap - VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] {V of .MyMap & Any} - VALUE_PARAMETER name:p2 index:2 type:@[EnhancedNullability] java.util.function.BiFunction.MyMap, in @[EnhancedNullability] V of .MyMap, out V of .MyMap?> - FUN FAKE_OVERRIDE name:computeIfPresent visibility:public modality:OPEN <> ($this:kotlin.collections.MutableMap, p0:@[EnhancedNullability] K of .MyMap, p1:@[EnhancedNullability] java.util.function.BiFunction.MyMap, in @[EnhancedNullability] V of .MyMap, out V of .MyMap?>) returnType:V of .MyMap? [fake_override] - overridden: - public open fun computeIfPresent (p0: @[EnhancedNullability] K of kotlin.collections.AbstractMutableMap, p1: @[EnhancedNullability] java.util.function.BiFunction): V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap - $this: VALUE_PARAMETER name: type:kotlin.collections.MutableMap - VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] K of .MyMap - VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] java.util.function.BiFunction.MyMap, in @[EnhancedNullability] V of .MyMap, out V of .MyMap?> FUN FAKE_OVERRIDE name:putIfAbsent visibility:public modality:OPEN <> ($this:kotlin.collections.MutableMap, p0:@[EnhancedNullability] K of .MyMap, p1:@[EnhancedNullability] V of .MyMap) returnType:V of .MyMap? [fake_override] overridden: public open fun putIfAbsent (p0: @[EnhancedNullability] K of kotlin.collections.AbstractMutableMap, p1: @[EnhancedNullability] V of kotlin.collections.AbstractMutableMap): V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap @@ -112,53 +140,25 @@ FILE fqName: fileName:/AbstractMutableMap.kt $this: VALUE_PARAMETER name: type:kotlin.collections.MutableMap VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] K of .MyMap VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] java.util.function.Function.MyMap, out @[EnhancedNullability] V of .MyMap> + FUN FAKE_OVERRIDE name:computeIfPresent visibility:public modality:OPEN <> ($this:kotlin.collections.MutableMap, p0:@[EnhancedNullability] K of .MyMap, p1:@[EnhancedNullability] java.util.function.BiFunction.MyMap, in @[EnhancedNullability] V of .MyMap, out V of .MyMap?>) returnType:V of .MyMap? [fake_override] + overridden: + public open fun computeIfPresent (p0: @[EnhancedNullability] K of kotlin.collections.AbstractMutableMap, p1: @[EnhancedNullability] java.util.function.BiFunction): V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap + $this: VALUE_PARAMETER name: type:kotlin.collections.MutableMap + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] K of .MyMap + VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] java.util.function.BiFunction.MyMap, in @[EnhancedNullability] V of .MyMap, out V of .MyMap?> FUN FAKE_OVERRIDE name:compute visibility:public modality:OPEN <> ($this:kotlin.collections.MutableMap, p0:@[EnhancedNullability] K of .MyMap, p1:@[EnhancedNullability] java.util.function.BiFunction.MyMap, in V of .MyMap?, out V of .MyMap?>) returnType:V of .MyMap? [fake_override] overridden: public open fun compute (p0: @[EnhancedNullability] K of kotlin.collections.AbstractMutableMap, p1: @[EnhancedNullability] java.util.function.BiFunction): V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap $this: VALUE_PARAMETER name: type:kotlin.collections.MutableMap VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] K of .MyMap VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] java.util.function.BiFunction.MyMap, in V of .MyMap?, out V of .MyMap?> - FUN FAKE_OVERRIDE name:containsKey visibility:public modality:OPEN <> ($this:java.util.AbstractMap, p0:@[FlexibleNullability] K of .MyMap?) returnType:kotlin.Boolean [fake_override] + FUN FAKE_OVERRIDE name:merge visibility:public modality:OPEN <> ($this:kotlin.collections.MutableMap, p0:@[EnhancedNullability] K of .MyMap, p1:@[EnhancedNullability] {V of .MyMap & Any}, p2:@[EnhancedNullability] java.util.function.BiFunction.MyMap, in @[EnhancedNullability] V of .MyMap, out V of .MyMap?>) returnType:V of .MyMap? [fake_override] overridden: - public open fun containsKey (p0: @[FlexibleNullability] K of kotlin.collections.AbstractMutableMap?): kotlin.Boolean [fake_override] declared in kotlin.collections.AbstractMutableMap - $this: VALUE_PARAMETER name: type:java.util.AbstractMap - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] K of .MyMap? - FUN FAKE_OVERRIDE name:containsValue visibility:public modality:OPEN <> ($this:java.util.AbstractMap, p0:@[FlexibleNullability] V of .MyMap?) returnType:kotlin.Boolean [fake_override] - overridden: - public open fun containsValue (p0: @[FlexibleNullability] V of kotlin.collections.AbstractMutableMap?): kotlin.Boolean [fake_override] declared in kotlin.collections.AbstractMutableMap - $this: VALUE_PARAMETER name: type:java.util.AbstractMap - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] V of .MyMap? - FUN FAKE_OVERRIDE name:get visibility:public modality:OPEN <> ($this:java.util.AbstractMap, p0:@[FlexibleNullability] K of .MyMap?) returnType:V of .MyMap? [fake_override,operator] - overridden: - public open fun get (p0: @[FlexibleNullability] K of kotlin.collections.AbstractMutableMap?): V of kotlin.collections.AbstractMutableMap? [fake_override,operator] declared in kotlin.collections.AbstractMutableMap - $this: VALUE_PARAMETER name: type:java.util.AbstractMap - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] K of .MyMap? - FUN FAKE_OVERRIDE name:getOrDefault visibility:public modality:OPEN <> ($this:kotlin.collections.Map, key:K of .MyMap, defaultValue:V of .MyMap) returnType:V of .MyMap [fake_override] - annotations: - SinceKotlin(version = '1.1') - PlatformDependent - overridden: - public open fun getOrDefault (key: K of kotlin.collections.AbstractMutableMap, defaultValue: V of kotlin.collections.AbstractMutableMap): V of kotlin.collections.AbstractMutableMap [fake_override] declared in kotlin.collections.AbstractMutableMap - $this: VALUE_PARAMETER name: type:kotlin.collections.Map - VALUE_PARAMETER name:key index:0 type:K of .MyMap - VALUE_PARAMETER name:defaultValue index:1 type:V of .MyMap - FUN FAKE_OVERRIDE name:isEmpty visibility:public modality:OPEN <> ($this:java.util.AbstractMap) returnType:kotlin.Boolean [fake_override] - overridden: - public open fun isEmpty (): kotlin.Boolean [fake_override] declared in kotlin.collections.AbstractMutableMap - $this: VALUE_PARAMETER name: type:java.util.AbstractMap - PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] - overridden: - public open size: kotlin.Int [fake_override,val] - FUN FAKE_OVERRIDE name: visibility:public modality:OPEN <> ($this:java.util.AbstractMap) returnType:kotlin.Int [fake_override] - correspondingProperty: PROPERTY FAKE_OVERRIDE name:size visibility:public modality:OPEN [fake_override,val] - overridden: - public open fun (): kotlin.Int [fake_override] declared in kotlin.collections.AbstractMutableMap - $this: VALUE_PARAMETER name: type:java.util.AbstractMap - FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:kotlin.collections.Map, p0:@[EnhancedNullability] java.util.function.BiConsumer.MyMap, in @[EnhancedNullability] V of .MyMap>) returnType:kotlin.Unit [fake_override] - overridden: - public open fun forEach (p0: @[EnhancedNullability] java.util.function.BiConsumer): kotlin.Unit [fake_override] declared in kotlin.collections.AbstractMutableMap - $this: VALUE_PARAMETER name: type:kotlin.collections.Map - VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.BiConsumer.MyMap, in @[EnhancedNullability] V of .MyMap> + public open fun merge (p0: @[EnhancedNullability] K of kotlin.collections.AbstractMutableMap, p1: @[EnhancedNullability] {V of kotlin.collections.AbstractMutableMap & Any}, p2: @[EnhancedNullability] java.util.function.BiFunction): V of kotlin.collections.AbstractMutableMap? [fake_override] declared in kotlin.collections.AbstractMutableMap + $this: VALUE_PARAMETER name: type:kotlin.collections.MutableMap + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] K of .MyMap + VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] {V of .MyMap & Any} + VALUE_PARAMETER name:p2 index:2 type:@[EnhancedNullability] java.util.function.BiFunction.MyMap, in @[EnhancedNullability] V of .MyMap, out V of .MyMap?> FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:java.util.AbstractMap, p0:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (p0: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.collections.AbstractMutableMap diff --git a/compiler/testData/ir/irText/firProblems/ArrayListOverrides.fir.ir.txt b/compiler/testData/ir/irText/firProblems/ArrayListOverrides.fir.ir.txt index cf45eed3cb5..40e62ad6cd3 100644 --- a/compiler/testData/ir/irText/firProblems/ArrayListOverrides.fir.ir.txt +++ b/compiler/testData/ir/irText/firProblems/ArrayListOverrides.fir.ir.txt @@ -180,14 +180,14 @@ FILE fqName: fileName:/ArrayListOverrides.kt overridden: public open fun toString (): @[EnhancedNullability] kotlin.String [fake_override] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.AbstractCollection - FUN FAKE_OVERRIDE name:parallelStream visibility:public modality:OPEN <> ($this:kotlin.collections.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] kotlin.String?> [fake_override] - overridden: - public open fun parallelStream (): @[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] E of java.util.ArrayList?> [fake_override] declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:kotlin.collections.Collection FUN FAKE_OVERRIDE name:stream visibility:public modality:OPEN <> ($this:kotlin.collections.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] kotlin.String?> [fake_override] overridden: public open fun stream (): @[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] E of java.util.ArrayList?> [fake_override] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:kotlin.collections.Collection + FUN FAKE_OVERRIDE name:parallelStream visibility:public modality:OPEN <> ($this:kotlin.collections.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] kotlin.String?> [fake_override] + overridden: + public open fun parallelStream (): @[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] E of java.util.ArrayList?> [fake_override] declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:kotlin.collections.Collection FUN FAKE_OVERRIDE name:removeAt visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[EnhancedNullability] kotlin.String [fake_override,operator] overridden: public open fun removeAt (p0: kotlin.Int): @[EnhancedNullability] E of java.util.ArrayList [operator] declared in java.util.ArrayList @@ -377,14 +377,14 @@ FILE fqName: fileName:/ArrayListOverrides.kt overridden: public open fun toString (): @[EnhancedNullability] kotlin.String [fake_override] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.AbstractCollection - FUN FAKE_OVERRIDE name:parallelStream visibility:public modality:OPEN <> ($this:kotlin.collections.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] kotlin.String?> [fake_override] - overridden: - public open fun parallelStream (): @[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] E of java.util.ArrayList?> [fake_override] declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:kotlin.collections.Collection FUN FAKE_OVERRIDE name:stream visibility:public modality:OPEN <> ($this:kotlin.collections.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] kotlin.String?> [fake_override] overridden: public open fun stream (): @[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] E of java.util.ArrayList?> [fake_override] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:kotlin.collections.Collection + FUN FAKE_OVERRIDE name:parallelStream visibility:public modality:OPEN <> ($this:kotlin.collections.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] kotlin.String?> [fake_override] + overridden: + public open fun parallelStream (): @[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] E of java.util.ArrayList?> [fake_override] declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:kotlin.collections.Collection FUN FAKE_OVERRIDE name:removeAt visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[EnhancedNullability] kotlin.String [fake_override,operator] overridden: public open fun removeAt (p0: kotlin.Int): @[EnhancedNullability] E of java.util.ArrayList [operator] declared in java.util.ArrayList diff --git a/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.ir.txt b/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.ir.txt index d80198ce773..a66125d790b 100644 --- a/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.ir.txt +++ b/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.ir.txt @@ -85,6 +85,16 @@ FILE fqName: fileName:/DelegationAndInheritanceFromJava.kt $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.Foo.B visibility:private [final]' type=.Foo.B origin=null receiver: GET_VAR ': .Impl declared in .Impl.retainAll' type=.Impl origin=null elements: GET_VAR 'elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> declared in .Impl.retainAll' type=kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> origin=null + FUN DELEGATED_MEMBER name:isEmpty visibility:public modality:OPEN <> ($this:.Impl) returnType:kotlin.Boolean + overridden: + public abstract fun isEmpty (): kotlin.Boolean [fake_override] declared in .Foo.A + public abstract fun isEmpty (): kotlin.Boolean [fake_override] declared in .Foo.B + $this: VALUE_PARAMETER name: type:.Impl + BLOCK_BODY + RETURN type=kotlin.Nothing from='public open fun isEmpty (): kotlin.Boolean declared in .Impl' + CALL 'public abstract fun isEmpty (): kotlin.Boolean declared in kotlin.collections.Set' type=kotlin.Boolean origin=null + $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.Foo.B visibility:private [final]' type=.Foo.B origin=null + receiver: GET_VAR ': .Impl declared in .Impl.isEmpty' type=.Impl origin=null FUN DELEGATED_MEMBER name:contains visibility:public modality:OPEN <> ($this:.Impl, element:@[FlexibleNullability] kotlin.String?) returnType:kotlin.Boolean [operator] overridden: public abstract fun contains (element: @[FlexibleNullability] kotlin.String?): kotlin.Boolean [fake_override,operator] declared in .Foo.A @@ -109,16 +119,6 @@ FILE fqName: fileName:/DelegationAndInheritanceFromJava.kt $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.Foo.B visibility:private [final]' type=.Foo.B origin=null receiver: GET_VAR ': .Impl declared in .Impl.containsAll' type=.Impl origin=null elements: GET_VAR 'elements: kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> declared in .Impl.containsAll' type=kotlin.collections.Collection<@[FlexibleNullability] kotlin.String?> origin=null - FUN DELEGATED_MEMBER name:isEmpty visibility:public modality:OPEN <> ($this:.Impl) returnType:kotlin.Boolean - overridden: - public abstract fun isEmpty (): kotlin.Boolean [fake_override] declared in .Foo.A - public abstract fun isEmpty (): kotlin.Boolean [fake_override] declared in .Foo.B - $this: VALUE_PARAMETER name: type:.Impl - BLOCK_BODY - RETURN type=kotlin.Nothing from='public open fun isEmpty (): kotlin.Boolean declared in .Impl' - CALL 'public abstract fun isEmpty (): kotlin.Boolean declared in kotlin.collections.Set' type=kotlin.Boolean origin=null - $this: GET_FIELD 'FIELD DELEGATE name:$$delegate_0 type:.Foo.B visibility:private [final]' type=.Foo.B origin=null - receiver: GET_VAR ': .Impl declared in .Impl.isEmpty' type=.Impl origin=null PROPERTY DELEGATED_MEMBER name:size visibility:public modality:OPEN [val] overridden: public abstract size: kotlin.Int [fake_override,val] diff --git a/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.kt.txt b/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.kt.txt index fec854a252a..2d8c9fc9565 100644 --- a/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/DelegationAndInheritanceFromJava.fir.kt.txt @@ -33,6 +33,10 @@ class Impl : A, B { return .#$$delegate_0.retainAll(elements = elements) } + override fun isEmpty(): Boolean { + return .#$$delegate_0.isEmpty() + } + override operator fun contains(element: @FlexibleNullability String?): Boolean { return .#$$delegate_0.contains(element = element) } @@ -41,10 +45,6 @@ class Impl : A, B { return .#$$delegate_0.containsAll(elements = elements) } - override fun isEmpty(): Boolean { - return .#$$delegate_0.isEmpty() - } - override val size: Int override get(): Int { return .#$$delegate_0.() diff --git a/compiler/testData/ir/irText/firProblems/MultiList.fir.ir.txt b/compiler/testData/ir/irText/firProblems/MultiList.fir.ir.txt index 05177aa9bb7..2afd01149ce 100644 --- a/compiler/testData/ir/irText/firProblems/MultiList.fir.ir.txt +++ b/compiler/testData/ir/irText/firProblems/MultiList.fir.ir.txt @@ -157,23 +157,10 @@ FILE fqName: fileName:/MultiList.kt overridden: public abstract fun (): kotlin.Int declared in kotlin.collections.List $this: VALUE_PARAMETER name: type:kotlin.collections.List - FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:kotlin.collections.Collection) returnType:@[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] .Some.MyList>?> [fake_override] + FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:kotlin.collections.List) returnType:@[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] .Some.MyList>?> [fake_override] overridden: - public open fun spliterator (): @[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] E of kotlin.collections.List?> [fake_override] declared in kotlin.collections.List - $this: VALUE_PARAMETER name: type:kotlin.collections.Collection - FUN FAKE_OVERRIDE name:parallelStream visibility:public modality:OPEN <> ($this:kotlin.collections.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] .Some.MyList>> [fake_override] - overridden: - public open fun parallelStream (): @[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] E of kotlin.collections.List> [fake_override] declared in kotlin.collections.List - $this: VALUE_PARAMETER name: type:kotlin.collections.Collection - FUN FAKE_OVERRIDE name:stream visibility:public modality:OPEN <> ($this:kotlin.collections.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] .Some.MyList>> [fake_override] - overridden: - public open fun stream (): @[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] E of kotlin.collections.List> [fake_override] declared in kotlin.collections.List - $this: VALUE_PARAMETER name: type:kotlin.collections.Collection - FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:kotlin.collections.Iterable, p0:@[FlexibleNullability] java.util.function.Consumer.Some.MyList>?>?) returnType:kotlin.Unit [fake_override] - overridden: - public open fun forEach (p0: @[FlexibleNullability] java.util.function.Consumer?): kotlin.Unit [fake_override] declared in kotlin.collections.List - $this: VALUE_PARAMETER name: type:kotlin.collections.Iterable - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.function.Consumer.Some.MyList>?>? + public open fun spliterator (): @[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] E of kotlin.collections.List?> declared in kotlin.collections.List + $this: VALUE_PARAMETER name: type:kotlin.collections.List FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in kotlin.collections.List @@ -187,6 +174,19 @@ FILE fqName: fileName:/MultiList.kt overridden: public open fun toString (): kotlin.String [fake_override] declared in kotlin.collections.List $this: VALUE_PARAMETER name: type:kotlin.Any + FUN FAKE_OVERRIDE name:stream visibility:public modality:OPEN <> ($this:kotlin.collections.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] .Some.MyList>> [fake_override] + overridden: + public open fun stream (): @[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] E of kotlin.collections.List> [fake_override] declared in kotlin.collections.List + $this: VALUE_PARAMETER name: type:kotlin.collections.Collection + FUN FAKE_OVERRIDE name:parallelStream visibility:public modality:OPEN <> ($this:kotlin.collections.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] .Some.MyList>> [fake_override] + overridden: + public open fun parallelStream (): @[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] E of kotlin.collections.List> [fake_override] declared in kotlin.collections.List + $this: VALUE_PARAMETER name: type:kotlin.collections.Collection + FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:kotlin.collections.Iterable, p0:@[FlexibleNullability] java.util.function.Consumer.Some.MyList>?>?) returnType:kotlin.Unit [fake_override] + overridden: + public open fun forEach (p0: @[FlexibleNullability] java.util.function.Consumer?): kotlin.Unit [fake_override] declared in kotlin.collections.List + $this: VALUE_PARAMETER name: type:kotlin.collections.Iterable + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.function.Consumer.Some.MyList>?>? CLASS CLASS name:SomeList modality:OPEN visibility:public superTypes:[.MyList.SomeList>; java.util.ArrayList<.Some.SomeList>>] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:.SomeList.SomeList> TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false @@ -251,23 +251,77 @@ FILE fqName: fileName:/MultiList.kt overridden: public open fun (): kotlin.Int declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[FlexibleNullability] kotlin.Array? [fake_override] + overridden: + public open fun toArray (): @[FlexibleNullability] kotlin.Array? declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN ($this:java.util.ArrayList, p0:@[FlexibleNullability] kotlin.Array.SomeList.toArray?>?) returnType:@[FlexibleNullability] kotlin.Array.SomeList.toArray?>? [fake_override] + overridden: + public open fun toArray (p0: @[FlexibleNullability] kotlin.Array?): @[FlexibleNullability] kotlin.Array? declared in java.util.ArrayList + TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] kotlin.Array.SomeList.toArray?>? + FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] .Some.SomeList>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun add (p0: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] .Some.SomeList> + FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[EnhancedNullability] .Some.SomeList>) returnType:kotlin.Unit [fake_override] + overridden: + public open fun add (p0: kotlin.Int, p1: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Unit declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] .Some.SomeList> + FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] .Some.SomeList>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun remove (p0: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] .Some.SomeList> + FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun addAll (p0: @[EnhancedNullability] kotlin.collections.Collection): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>> + FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun addAll (p0: kotlin.Int, p1: @[EnhancedNullability] kotlin.collections.Collection): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>> + FUN FAKE_OVERRIDE name:removeAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<@[EnhancedNullability] .Some.SomeList>>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun removeAll (p0: kotlin.collections.Collection<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<@[EnhancedNullability] .Some.SomeList>> + FUN FAKE_OVERRIDE name:retainAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<@[EnhancedNullability] .Some.SomeList>>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun retainAll (p0: kotlin.collections.Collection<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<@[EnhancedNullability] .Some.SomeList>> + FUN FAKE_OVERRIDE name:replaceAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] java.util.function.UnaryOperator<@[EnhancedNullability] .Some.SomeList>>) returnType:kotlin.Unit [fake_override] + overridden: + public open fun replaceAll (p0: @[EnhancedNullability] java.util.function.UnaryOperator<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Unit declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.UnaryOperator<@[EnhancedNullability] .Some.SomeList>> + FUN FAKE_OVERRIDE name:sort visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] java.util.Comparator.Some.SomeList>?>?) returnType:kotlin.Unit [fake_override] + overridden: + public open fun sort (p0: @[FlexibleNullability] java.util.Comparator?): kotlin.Unit declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.Comparator.Some.SomeList>?>? + FUN FAKE_OVERRIDE name:clear visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Unit [fake_override] + overridden: + public open fun clear (): kotlin.Unit declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:set visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[EnhancedNullability] .Some.SomeList>) returnType:@[EnhancedNullability] .Some.SomeList> [fake_override,operator] + overridden: + public open fun set (p0: kotlin.Int, p1: @[EnhancedNullability] E of java.util.ArrayList): @[EnhancedNullability] E of java.util.ArrayList [operator] declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] .Some.SomeList> FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] .Some.SomeList>?> [fake_override] overridden: public open fun spliterator (): @[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] E of java.util.ArrayList?> declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:parallelStream visibility:public modality:OPEN <> ($this:kotlin.collections.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] .Some.SomeList>> [fake_override] - overridden: - public open fun parallelStream (): @[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] .Some.MyList>> [fake_override] declared in .MyList - $this: VALUE_PARAMETER name: type:kotlin.collections.Collection - FUN FAKE_OVERRIDE name:stream visibility:public modality:OPEN <> ($this:kotlin.collections.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] .Some.SomeList>> [fake_override] - overridden: - public open fun stream (): @[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] .Some.MyList>> [fake_override] declared in .MyList - $this: VALUE_PARAMETER name: type:kotlin.collections.Collection - FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] java.util.function.Consumer.Some.SomeList>?>?) returnType:kotlin.Unit [fake_override] - overridden: - public open fun forEach (p0: @[FlexibleNullability] java.util.function.Consumer?): kotlin.Unit declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.function.Consumer.Some.SomeList>?>? FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:java.util.AbstractList, p0:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (p0: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in java.util.ArrayList @@ -281,6 +335,24 @@ FILE fqName: fileName:/MultiList.kt overridden: public open fun toString (): @[EnhancedNullability] kotlin.String [fake_override] declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.AbstractCollection + FUN FAKE_OVERRIDE name:removeIf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] java.util.function.Predicate.Some.SomeList>>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun removeIf (p0: @[EnhancedNullability] java.util.function.Predicate): kotlin.Boolean declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.Predicate.Some.SomeList>> + FUN FAKE_OVERRIDE name:stream visibility:public modality:OPEN <> ($this:kotlin.collections.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] .Some.SomeList>> [fake_override] + overridden: + public open fun stream (): @[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] .Some.MyList>> [fake_override] declared in .MyList + $this: VALUE_PARAMETER name: type:kotlin.collections.Collection + FUN FAKE_OVERRIDE name:parallelStream visibility:public modality:OPEN <> ($this:kotlin.collections.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] .Some.SomeList>> [fake_override] + overridden: + public open fun parallelStream (): @[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] .Some.MyList>> [fake_override] declared in .MyList + $this: VALUE_PARAMETER name: type:kotlin.collections.Collection + FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] java.util.function.Consumer.Some.SomeList>?>?) returnType:kotlin.Unit [fake_override] + overridden: + public open fun forEach (p0: @[FlexibleNullability] java.util.function.Consumer?): kotlin.Unit declared in java.util.ArrayList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.function.Consumer.Some.SomeList>?>? FUN FAKE_OVERRIDE name:elementData visibility:public/*package*/ modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[FlexibleNullability] .Some.SomeList>? [fake_override] overridden: public/*package*/ open fun elementData (p0: kotlin.Int): @[FlexibleNullability] E of java.util.ArrayList? declared in java.util.ArrayList @@ -299,84 +371,12 @@ FILE fqName: fileName:/MultiList.kt overridden: public open fun clone (): @[EnhancedNullability] kotlin.Any declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[FlexibleNullability] kotlin.Array? [fake_override] - overridden: - public open fun toArray (): @[FlexibleNullability] kotlin.Array? declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN ($this:java.util.ArrayList, p0:@[FlexibleNullability] kotlin.Array.SomeList.toArray?>?) returnType:@[FlexibleNullability] kotlin.Array.SomeList.toArray?>? [fake_override] - overridden: - public open fun toArray (p0: @[FlexibleNullability] kotlin.Array?): @[FlexibleNullability] kotlin.Array? declared in java.util.ArrayList - TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] kotlin.Array.SomeList.toArray?>? - FUN FAKE_OVERRIDE name:set visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[EnhancedNullability] .Some.SomeList>) returnType:@[EnhancedNullability] .Some.SomeList> [fake_override,operator] - overridden: - public open fun set (p0: kotlin.Int, p1: @[EnhancedNullability] E of java.util.ArrayList): @[EnhancedNullability] E of java.util.ArrayList [operator] declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] .Some.SomeList> - FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] .Some.SomeList>) returnType:kotlin.Boolean [fake_override] - overridden: - public open fun add (p0: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Boolean declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] .Some.SomeList> - FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[EnhancedNullability] .Some.SomeList>) returnType:kotlin.Unit [fake_override] - overridden: - public open fun add (p0: kotlin.Int, p1: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Unit declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] .Some.SomeList> - FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] .Some.SomeList>) returnType:kotlin.Boolean [fake_override] - overridden: - public open fun remove (p0: @[EnhancedNullability] E of java.util.ArrayList): kotlin.Boolean declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] .Some.SomeList> - FUN FAKE_OVERRIDE name:clear visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Unit [fake_override] - overridden: - public open fun clear (): kotlin.Unit declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>>) returnType:kotlin.Boolean [fake_override] - overridden: - public open fun addAll (p0: @[EnhancedNullability] kotlin.collections.Collection): kotlin.Boolean declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>> - FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>>) returnType:kotlin.Boolean [fake_override] - overridden: - public open fun addAll (p0: kotlin.Int, p1: @[EnhancedNullability] kotlin.collections.Collection): kotlin.Boolean declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>> FUN FAKE_OVERRIDE name:removeRange visibility:protected/*protected and package*/ modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:kotlin.Int) returnType:kotlin.Unit [fake_override] overridden: protected/*protected and package*/ open fun removeRange (p0: kotlin.Int, p1: kotlin.Int): kotlin.Unit declared in java.util.ArrayList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int VALUE_PARAMETER name:p1 index:1 type:kotlin.Int - FUN FAKE_OVERRIDE name:removeAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<@[EnhancedNullability] .Some.SomeList>>) returnType:kotlin.Boolean [fake_override] - overridden: - public open fun removeAll (p0: kotlin.collections.Collection<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Boolean declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<@[EnhancedNullability] .Some.SomeList>> - FUN FAKE_OVERRIDE name:retainAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<@[EnhancedNullability] .Some.SomeList>>) returnType:kotlin.Boolean [fake_override] - overridden: - public open fun retainAll (p0: kotlin.collections.Collection<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Boolean declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<@[EnhancedNullability] .Some.SomeList>> - FUN FAKE_OVERRIDE name:removeIf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] java.util.function.Predicate.Some.SomeList>>) returnType:kotlin.Boolean [fake_override] - overridden: - public open fun removeIf (p0: @[EnhancedNullability] java.util.function.Predicate): kotlin.Boolean declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.Predicate.Some.SomeList>> - FUN FAKE_OVERRIDE name:replaceAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] java.util.function.UnaryOperator<@[EnhancedNullability] .Some.SomeList>>) returnType:kotlin.Unit [fake_override] - overridden: - public open fun replaceAll (p0: @[EnhancedNullability] java.util.function.UnaryOperator<@[EnhancedNullability] E of java.util.ArrayList>): kotlin.Unit declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.UnaryOperator<@[EnhancedNullability] .Some.SomeList>> - FUN FAKE_OVERRIDE name:sort visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] java.util.Comparator.Some.SomeList>?>?) returnType:kotlin.Unit [fake_override] - overridden: - public open fun sort (p0: @[FlexibleNullability] java.util.Comparator?): kotlin.Unit declared in java.util.ArrayList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.Comparator.Some.SomeList>?>? FUN FAKE_OVERRIDE name:removeAt visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[EnhancedNullability] .Some.SomeList> [fake_override,operator] overridden: public open fun removeAt (p0: kotlin.Int): @[EnhancedNullability] E of java.util.ArrayList [operator] declared in java.util.ArrayList @@ -445,23 +445,77 @@ FILE fqName: fileName:/MultiList.kt overridden: public open fun (): kotlin.Int [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[FlexibleNullability] kotlin.Array? [fake_override] + overridden: + public open fun toArray (): @[FlexibleNullability] kotlin.Array? [fake_override] declared in .SomeList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN ($this:java.util.ArrayList, p0:@[FlexibleNullability] kotlin.Array.FinalList.toArray?>?) returnType:@[FlexibleNullability] kotlin.Array.FinalList.toArray?>? [fake_override] + overridden: + public open fun toArray (p0: @[FlexibleNullability] kotlin.Array.SomeList.toArray?>?): @[FlexibleNullability] kotlin.Array.SomeList.toArray?>? [fake_override] declared in .SomeList + TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] kotlin.Array.FinalList.toArray?>? + FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] .Some) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun add (p0: @[EnhancedNullability] .Some.SomeList>): kotlin.Boolean [fake_override] declared in .SomeList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] .Some + FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[EnhancedNullability] .Some) returnType:kotlin.Unit [fake_override] + overridden: + public open fun add (p0: kotlin.Int, p1: @[EnhancedNullability] .Some.SomeList>): kotlin.Unit [fake_override] declared in .SomeList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] .Some + FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] .Some) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun remove (p0: @[EnhancedNullability] .Some.SomeList>): kotlin.Boolean [fake_override] declared in .SomeList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] .Some + FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] kotlin.collections.Collection.Some>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun addAll (p0: @[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>>): kotlin.Boolean [fake_override] declared in .SomeList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] kotlin.collections.Collection.Some> + FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[EnhancedNullability] kotlin.collections.Collection.Some>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun addAll (p0: kotlin.Int, p1: @[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>>): kotlin.Boolean [fake_override] declared in .SomeList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] kotlin.collections.Collection.Some> + FUN FAKE_OVERRIDE name:removeAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<@[EnhancedNullability] .Some>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun removeAll (p0: kotlin.collections.Collection<@[EnhancedNullability] .Some.SomeList>>): kotlin.Boolean [fake_override] declared in .SomeList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<@[EnhancedNullability] .Some> + FUN FAKE_OVERRIDE name:retainAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<@[EnhancedNullability] .Some>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun retainAll (p0: kotlin.collections.Collection<@[EnhancedNullability] .Some.SomeList>>): kotlin.Boolean [fake_override] declared in .SomeList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<@[EnhancedNullability] .Some> + FUN FAKE_OVERRIDE name:replaceAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] java.util.function.UnaryOperator<@[EnhancedNullability] .Some>) returnType:kotlin.Unit [fake_override] + overridden: + public open fun replaceAll (p0: @[EnhancedNullability] java.util.function.UnaryOperator<@[EnhancedNullability] .Some.SomeList>>): kotlin.Unit [fake_override] declared in .SomeList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.UnaryOperator<@[EnhancedNullability] .Some> + FUN FAKE_OVERRIDE name:sort visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] java.util.Comparator.Some?>?) returnType:kotlin.Unit [fake_override] + overridden: + public open fun sort (p0: @[FlexibleNullability] java.util.Comparator.Some.SomeList>?>?): kotlin.Unit [fake_override] declared in .SomeList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.Comparator.Some?>? + FUN FAKE_OVERRIDE name:clear visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Unit [fake_override] + overridden: + public open fun clear (): kotlin.Unit [fake_override] declared in .SomeList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + FUN FAKE_OVERRIDE name:set visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[EnhancedNullability] .Some) returnType:@[EnhancedNullability] .Some [fake_override,operator] + overridden: + public open fun set (p0: kotlin.Int, p1: @[EnhancedNullability] .Some.SomeList>): @[EnhancedNullability] .Some.SomeList> [fake_override,operator] declared in .SomeList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:kotlin.Int + VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] .Some FUN FAKE_OVERRIDE name:spliterator visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] .Some?> [fake_override] overridden: public open fun spliterator (): @[EnhancedNullability] java.util.Spliterator<@[FlexibleNullability] .Some.SomeList>?> [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:parallelStream visibility:public modality:OPEN <> ($this:kotlin.collections.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] .Some> [fake_override] - overridden: - public open fun parallelStream (): @[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] .Some.SomeList>> [fake_override] declared in .SomeList - $this: VALUE_PARAMETER name: type:kotlin.collections.Collection - FUN FAKE_OVERRIDE name:stream visibility:public modality:OPEN <> ($this:kotlin.collections.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] .Some> [fake_override] - overridden: - public open fun stream (): @[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] .Some.SomeList>> [fake_override] declared in .SomeList - $this: VALUE_PARAMETER name: type:kotlin.collections.Collection - FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] java.util.function.Consumer.Some?>?) returnType:kotlin.Unit [fake_override] - overridden: - public open fun forEach (p0: @[FlexibleNullability] java.util.function.Consumer.Some.SomeList>?>?): kotlin.Unit [fake_override] declared in .SomeList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.function.Consumer.Some?>? FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:java.util.AbstractList, p0:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator] overridden: public open fun equals (p0: kotlin.Any?): kotlin.Boolean [fake_override,operator] declared in .SomeList @@ -475,6 +529,24 @@ FILE fqName: fileName:/MultiList.kt overridden: public open fun toString (): @[EnhancedNullability] kotlin.String [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.AbstractCollection + FUN FAKE_OVERRIDE name:removeIf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] java.util.function.Predicate.Some>) returnType:kotlin.Boolean [fake_override] + overridden: + public open fun removeIf (p0: @[EnhancedNullability] java.util.function.Predicate.Some.SomeList>>): kotlin.Boolean [fake_override] declared in .SomeList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.Predicate.Some> + FUN FAKE_OVERRIDE name:stream visibility:public modality:OPEN <> ($this:kotlin.collections.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] .Some> [fake_override] + overridden: + public open fun stream (): @[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] .Some.SomeList>> [fake_override] declared in .SomeList + $this: VALUE_PARAMETER name: type:kotlin.collections.Collection + FUN FAKE_OVERRIDE name:parallelStream visibility:public modality:OPEN <> ($this:kotlin.collections.Collection) returnType:@[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] .Some> [fake_override] + overridden: + public open fun parallelStream (): @[EnhancedNullability] java.util.stream.Stream<@[EnhancedNullability] .Some.SomeList>> [fake_override] declared in .SomeList + $this: VALUE_PARAMETER name: type:kotlin.collections.Collection + FUN FAKE_OVERRIDE name:forEach visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] java.util.function.Consumer.Some?>?) returnType:kotlin.Unit [fake_override] + overridden: + public open fun forEach (p0: @[FlexibleNullability] java.util.function.Consumer.Some.SomeList>?>?): kotlin.Unit [fake_override] declared in .SomeList + $this: VALUE_PARAMETER name: type:java.util.ArrayList + VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.function.Consumer.Some?>? FUN FAKE_OVERRIDE name:elementData visibility:public/*package*/ modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[FlexibleNullability] .Some? [fake_override] overridden: public/*package*/ open fun elementData (p0: kotlin.Int): @[FlexibleNullability] .Some.SomeList>? [fake_override] declared in .SomeList @@ -493,84 +565,12 @@ FILE fqName: fileName:/MultiList.kt overridden: public open fun clone (): @[EnhancedNullability] kotlin.Any [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:@[FlexibleNullability] kotlin.Array? [fake_override] - overridden: - public open fun toArray (): @[FlexibleNullability] kotlin.Array? [fake_override] declared in .SomeList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:toArray visibility:public modality:OPEN ($this:java.util.ArrayList, p0:@[FlexibleNullability] kotlin.Array.FinalList.toArray?>?) returnType:@[FlexibleNullability] kotlin.Array.FinalList.toArray?>? [fake_override] - overridden: - public open fun toArray (p0: @[FlexibleNullability] kotlin.Array.SomeList.toArray?>?): @[FlexibleNullability] kotlin.Array.SomeList.toArray?>? [fake_override] declared in .SomeList - TYPE_PARAMETER name:T index:0 variance: superTypes:[@[FlexibleNullability] kotlin.Any?] reified:false - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] kotlin.Array.FinalList.toArray?>? - FUN FAKE_OVERRIDE name:set visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[EnhancedNullability] .Some) returnType:@[EnhancedNullability] .Some [fake_override,operator] - overridden: - public open fun set (p0: kotlin.Int, p1: @[EnhancedNullability] .Some.SomeList>): @[EnhancedNullability] .Some.SomeList> [fake_override,operator] declared in .SomeList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] .Some - FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] .Some) returnType:kotlin.Boolean [fake_override] - overridden: - public open fun add (p0: @[EnhancedNullability] .Some.SomeList>): kotlin.Boolean [fake_override] declared in .SomeList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] .Some - FUN FAKE_OVERRIDE name:add visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[EnhancedNullability] .Some) returnType:kotlin.Unit [fake_override] - overridden: - public open fun add (p0: kotlin.Int, p1: @[EnhancedNullability] .Some.SomeList>): kotlin.Unit [fake_override] declared in .SomeList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] .Some - FUN FAKE_OVERRIDE name:remove visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] .Some) returnType:kotlin.Boolean [fake_override] - overridden: - public open fun remove (p0: @[EnhancedNullability] .Some.SomeList>): kotlin.Boolean [fake_override] declared in .SomeList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] .Some - FUN FAKE_OVERRIDE name:clear visibility:public modality:OPEN <> ($this:java.util.ArrayList) returnType:kotlin.Unit [fake_override] - overridden: - public open fun clear (): kotlin.Unit [fake_override] declared in .SomeList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] kotlin.collections.Collection.Some>) returnType:kotlin.Boolean [fake_override] - overridden: - public open fun addAll (p0: @[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>>): kotlin.Boolean [fake_override] declared in .SomeList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] kotlin.collections.Collection.Some> - FUN FAKE_OVERRIDE name:addAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:@[EnhancedNullability] kotlin.collections.Collection.Some>) returnType:kotlin.Boolean [fake_override] - overridden: - public open fun addAll (p0: kotlin.Int, p1: @[EnhancedNullability] kotlin.collections.Collection.Some.SomeList>>): kotlin.Boolean [fake_override] declared in .SomeList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:kotlin.Int - VALUE_PARAMETER name:p1 index:1 type:@[EnhancedNullability] kotlin.collections.Collection.Some> FUN FAKE_OVERRIDE name:removeRange visibility:protected/*protected and package*/ modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int, p1:kotlin.Int) returnType:kotlin.Unit [fake_override] overridden: protected/*protected and package*/ open fun removeRange (p0: kotlin.Int, p1: kotlin.Int): kotlin.Unit [fake_override] declared in .SomeList $this: VALUE_PARAMETER name: type:java.util.ArrayList VALUE_PARAMETER name:p0 index:0 type:kotlin.Int VALUE_PARAMETER name:p1 index:1 type:kotlin.Int - FUN FAKE_OVERRIDE name:removeAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<@[EnhancedNullability] .Some>) returnType:kotlin.Boolean [fake_override] - overridden: - public open fun removeAll (p0: kotlin.collections.Collection<@[EnhancedNullability] .Some.SomeList>>): kotlin.Boolean [fake_override] declared in .SomeList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<@[EnhancedNullability] .Some> - FUN FAKE_OVERRIDE name:retainAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.collections.Collection<@[EnhancedNullability] .Some>) returnType:kotlin.Boolean [fake_override] - overridden: - public open fun retainAll (p0: kotlin.collections.Collection<@[EnhancedNullability] .Some.SomeList>>): kotlin.Boolean [fake_override] declared in .SomeList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:kotlin.collections.Collection<@[EnhancedNullability] .Some> - FUN FAKE_OVERRIDE name:removeIf visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] java.util.function.Predicate.Some>) returnType:kotlin.Boolean [fake_override] - overridden: - public open fun removeIf (p0: @[EnhancedNullability] java.util.function.Predicate.Some.SomeList>>): kotlin.Boolean [fake_override] declared in .SomeList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.Predicate.Some> - FUN FAKE_OVERRIDE name:replaceAll visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[EnhancedNullability] java.util.function.UnaryOperator<@[EnhancedNullability] .Some>) returnType:kotlin.Unit [fake_override] - overridden: - public open fun replaceAll (p0: @[EnhancedNullability] java.util.function.UnaryOperator<@[EnhancedNullability] .Some.SomeList>>): kotlin.Unit [fake_override] declared in .SomeList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[EnhancedNullability] java.util.function.UnaryOperator<@[EnhancedNullability] .Some> - FUN FAKE_OVERRIDE name:sort visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:@[FlexibleNullability] java.util.Comparator.Some?>?) returnType:kotlin.Unit [fake_override] - overridden: - public open fun sort (p0: @[FlexibleNullability] java.util.Comparator.Some.SomeList>?>?): kotlin.Unit [fake_override] declared in .SomeList - $this: VALUE_PARAMETER name: type:java.util.ArrayList - VALUE_PARAMETER name:p0 index:0 type:@[FlexibleNullability] java.util.Comparator.Some?>? FUN FAKE_OVERRIDE name:removeAt visibility:public modality:OPEN <> ($this:java.util.ArrayList, p0:kotlin.Int) returnType:@[EnhancedNullability] .Some [fake_override,operator] overridden: public open fun removeAt (p0: kotlin.Int): @[EnhancedNullability] .Some.SomeList> [fake_override,operator] declared in .SomeList diff --git a/compiler/testData/ir/irText/firProblems/lambdaInEnumEntryConstructorCall.fir.ir.txt b/compiler/testData/ir/irText/firProblems/lambdaInEnumEntryConstructorCall.fir.ir.txt index ba6a5d4675e..7cb58cb7dc3 100644 --- a/compiler/testData/ir/irText/firProblems/lambdaInEnumEntryConstructorCall.fir.ir.txt +++ b/compiler/testData/ir/irText/firProblems/lambdaInEnumEntryConstructorCall.fir.ir.txt @@ -115,3 +115,11 @@ FILE fqName: fileName:/lambdaInEnumEntryConstructorCall.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .ConfigurationParameter?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum diff --git a/compiler/testData/ir/irText/firProblems/thisInEnumConstructor.fir.ir.txt b/compiler/testData/ir/irText/firProblems/thisInEnumConstructor.fir.ir.txt index d787401fbde..7762e607543 100644 --- a/compiler/testData/ir/irText/firProblems/thisInEnumConstructor.fir.ir.txt +++ b/compiler/testData/ir/irText/firProblems/thisInEnumConstructor.fir.ir.txt @@ -74,3 +74,11 @@ FILE fqName: fileName:/thisInEnumConstructor.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .EE?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum diff --git a/compiler/testData/ir/irText/singletons/enumEntry.fir.ir.txt b/compiler/testData/ir/irText/singletons/enumEntry.fir.ir.txt index ac25618addc..9a95318e6b4 100644 --- a/compiler/testData/ir/irText/singletons/enumEntry.fir.ir.txt +++ b/compiler/testData/ir/irText/singletons/enumEntry.fir.ir.txt @@ -83,6 +83,14 @@ FILE fqName: fileName:/enumEntry.kt overridden: public final fun (): kotlin.Int [fake_override] declared in .Z $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .Z?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .Z?>? [fake_override] declared in .Z + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit [fake_override] declared in .Z + $this: VALUE_PARAMETER name: type:kotlin.Enum FUN ENUM_CLASS_SPECIAL_MEMBER name:values visibility:public modality:FINAL <> () returnType:kotlin.Array<.Z> SYNTHETIC_BODY kind=ENUM_VALUES FUN ENUM_CLASS_SPECIAL_MEMBER name:valueOf visibility:public modality:FINAL <> (value:kotlin.String) returnType:.Z @@ -132,3 +140,11 @@ FILE fqName: fileName:/enumEntry.kt overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:kotlin.Enum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .Z?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER name: type:kotlin.Enum diff --git a/compiler/testData/ir/irText/stubs/javaEnum.__JEnum.fir.ir.txt b/compiler/testData/ir/irText/stubs/javaEnum.__JEnum.fir.ir.txt index d4ff57cafb1..fb414b7066e 100644 --- a/compiler/testData/ir/irText/stubs/javaEnum.__JEnum.fir.ir.txt +++ b/compiler/testData/ir/irText/stubs/javaEnum.__JEnum.fir.ir.txt @@ -51,3 +51,11 @@ CLASS IR_EXTERNAL_JAVA_DECLARATION_STUB ENUM_CLASS name:JEnum modality:FINAL vis overridden: public final fun (): kotlin.Int declared in kotlin.Enum $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.JEnum + FUN FAKE_OVERRIDE name:getDeclaringClass visibility:public modality:FINAL <> ($this:.JEnum) returnType:@[FlexibleNullability] java.lang.Class<@[FlexibleNullability] .JEnum?>? [fake_override] + overridden: + public final fun getDeclaringClass (): @[FlexibleNullability] java.lang.Class<@[FlexibleNullability] E of kotlin.Enum?>? declared in kotlin.Enum + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.JEnum + FUN FAKE_OVERRIDE name:finalize visibility:protected/*protected and package*/ modality:FINAL <> ($this:.JEnum) returnType:kotlin.Unit [fake_override] + overridden: + protected/*protected and package*/ final fun finalize (): kotlin.Unit declared in kotlin.Enum + $this: VALUE_PARAMETER FAKE_OVERRIDE name: type:.JEnum diff --git a/core/compiler.common.jvm/src/org/jetbrains/kotlin/builtins/jvm/JavaToKotlinClassMap.kt b/core/compiler.common.jvm/src/org/jetbrains/kotlin/builtins/jvm/JavaToKotlinClassMap.kt index 43cccbf5a8b..bc4afadf583 100644 --- a/core/compiler.common.jvm/src/org/jetbrains/kotlin/builtins/jvm/JavaToKotlinClassMap.kt +++ b/core/compiler.common.jvm/src/org/jetbrains/kotlin/builtins/jvm/JavaToKotlinClassMap.kt @@ -204,7 +204,7 @@ object JavaToKotlinClassMap { fun isMutable(fqNameUnsafe: FqNameUnsafe?): Boolean = mutableToReadOnly.containsKey(fqNameUnsafe) fun isReadOnly(fqNameUnsafe: FqNameUnsafe?): Boolean = readOnlyToMutable.containsKey(fqNameUnsafe) - fun isMutable(classId: ClassId?): Boolean = readOnlyToMutableClassId.containsKey(classId) + fun isMutable(classId: ClassId?): Boolean = mutableToReadOnlyClassId.containsKey(classId) fun isReadOnly(classId: ClassId?): Boolean = readOnlyToMutableClassId.containsKey(classId) private fun classId(clazz: Class<*>): ClassId { diff --git a/core/compiler.common.jvm/src/org/jetbrains/kotlin/load/java/BuiltinSpecialProperties.kt b/core/compiler.common.jvm/src/org/jetbrains/kotlin/load/java/BuiltinSpecialProperties.kt index eed3141d20e..74d093468c3 100644 --- a/core/compiler.common.jvm/src/org/jetbrains/kotlin/load/java/BuiltinSpecialProperties.kt +++ b/core/compiler.common.jvm/src/org/jetbrains/kotlin/load/java/BuiltinSpecialProperties.kt @@ -6,6 +6,7 @@ package org.jetbrains.kotlin.load.java import org.jetbrains.kotlin.builtins.StandardNames +import org.jetbrains.kotlin.builtins.jvm.JavaToKotlinClassMap import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.name.FqNameUnsafe import org.jetbrains.kotlin.name.Name @@ -30,6 +31,10 @@ object BuiltinSpecialProperties { it.value.distinct() } + val GETTER_FQ_NAMES: Set = PROPERTY_FQ_NAME_TO_JVM_GETTER_NAME_MAP.mapTo(mutableSetOf()) { + JavaToKotlinClassMap.mapKotlinToJava(it.key.parent().toUnsafe())!!.asSingleFqName().child(it.value) + } + val SPECIAL_FQ_NAMES: Set = PROPERTY_FQ_NAME_TO_JVM_GETTER_NAME_MAP.keys val SPECIAL_SHORT_NAMES: Set = SPECIAL_FQ_NAMES.map(FqName::shortName).toSet() diff --git a/core/compiler.common.jvm/src/org/jetbrains/kotlin/load/java/SpecialGenericSignatures.kt b/core/compiler.common.jvm/src/org/jetbrains/kotlin/load/java/SpecialGenericSignatures.kt index 02516c4df75..2028483663b 100644 --- a/core/compiler.common.jvm/src/org/jetbrains/kotlin/load/java/SpecialGenericSignatures.kt +++ b/core/compiler.common.jvm/src/org/jetbrains/kotlin/load/java/SpecialGenericSignatures.kt @@ -41,12 +41,15 @@ open class SpecialGenericSignatures { SpecialSignatureInfo.OBJECT_PARAMETER_NON_GENERIC } - data class NameAndSignature internal constructor(val name: Name, val signature: String) + data class NameAndSignature(val classInternalName: String, val name: Name, val parameters: String, val returnType: String) { + val signature = SignatureBuildingComponents.signature(classInternalName, "$name($parameters)$returnType") + } private fun String.method(name: String, parameters: String, returnType: String) = NameAndSignature( + this@method, Name.identifier(name), - SignatureBuildingComponents.signature(this@method, "$name($parameters)$returnType") + parameters, returnType, ) private val ERASED_COLLECTION_PARAMETER_NAME_AND_SIGNATURES = setOf( @@ -125,6 +128,12 @@ open class SpecialGenericSignatures { val SIGNATURE_TO_JVM_REPRESENTATION_NAME: Map = NAME_AND_SIGNATURE_TO_JVM_REPRESENTATION_NAME_MAP.mapKeys { it.key.signature } + // java/lang/Number.intValue()I, java/lang/ etc. + val JVM_SIGNATURES_FOR_RENAMED_BUILT_INS: Set = + NAME_AND_SIGNATURE_TO_JVM_REPRESENTATION_NAME_MAP.mapTo(mutableSetOf()) { (signatureAndName, jdkName) -> + signatureAndName.copy(name = jdkName).signature + } + val ORIGINAL_SHORT_NAMES: List = NAME_AND_SIGNATURE_TO_JVM_REPRESENTATION_NAME_MAP.keys.map { it.name } val JVM_SHORT_NAME_TO_BUILTIN_SHORT_NAMES_MAP: Map =