diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/deserialization/FirMemberDeserializer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/deserialization/FirMemberDeserializer.kt index 3f491446db8..8f4356782f6 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/deserialization/FirMemberDeserializer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/deserialization/FirMemberDeserializer.kt @@ -47,7 +47,7 @@ class FirDeserializationContext( ): FirDeserializationContext = FirDeserializationContext( nameResolver, typeTable, versionRequirementTable, session, packageFqName, relativeClassName, FirTypeDeserializer( - nameResolver, typeTable, typeParameterProtos, typeDeserializer + session, nameResolver, typeTable, typeParameterProtos, typeDeserializer ), components ) @@ -98,6 +98,7 @@ class FirDeserializationContext( packageFqName, relativeClassName, FirTypeDeserializer( + session, nameResolver, typeTable, typeParameterProtos, diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/deserialization/FirTypeDeserializer.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/deserialization/FirTypeDeserializer.kt index ef9858e9846..c403717067a 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/deserialization/FirTypeDeserializer.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/deserialization/FirTypeDeserializer.kt @@ -5,22 +5,29 @@ package org.jetbrains.kotlin.fir.deserialization +import org.jetbrains.kotlin.fir.FirSession +import org.jetbrains.kotlin.fir.declarations.impl.FirTypeParameterImpl import org.jetbrains.kotlin.fir.resolve.toTypeProjection +import org.jetbrains.kotlin.fir.resolve.transformers.firUnsafe import org.jetbrains.kotlin.fir.symbols.* import org.jetbrains.kotlin.fir.symbols.impl.FirClassSymbol import org.jetbrains.kotlin.fir.symbols.impl.FirTypeAliasSymbol +import org.jetbrains.kotlin.fir.symbols.impl.FirTypeParameterSymbol import org.jetbrains.kotlin.fir.types.* import org.jetbrains.kotlin.fir.types.impl.ConeAbbreviatedTypeImpl import org.jetbrains.kotlin.fir.types.impl.ConeClassTypeImpl import org.jetbrains.kotlin.fir.types.impl.ConeTypeParameterTypeImpl +import org.jetbrains.kotlin.fir.types.impl.FirResolvedTypeRefImpl import org.jetbrains.kotlin.metadata.ProtoBuf import org.jetbrains.kotlin.metadata.deserialization.* import org.jetbrains.kotlin.serialization.deserialization.ProtoEnumFlags import org.jetbrains.kotlin.serialization.deserialization.getClassId import org.jetbrains.kotlin.serialization.deserialization.getName +import org.jetbrains.kotlin.types.Variance import java.util.* class FirTypeDeserializer( + val session: FirSession, val nameResolver: NameResolver, val typeTable: TypeTable, typeParameterProtos: List, @@ -52,17 +59,51 @@ class FirTypeDeserializer( private fun typeParameterSymbol(typeParameterId: Int): ConeTypeParameterLookupTag? = typeParameterDescriptors[typeParameterId] ?: parent?.typeParameterSymbol(typeParameterId) + + private fun ProtoBuf.TypeParameter.Variance.convertVariance(): Variance { + return when (this) { + ProtoBuf.TypeParameter.Variance.IN -> Variance.IN_VARIANCE + ProtoBuf.TypeParameter.Variance.OUT -> Variance.OUT_VARIANCE + ProtoBuf.TypeParameter.Variance.INV -> Variance.INVARIANT + } + } + private val typeParameterDescriptors = if (typeParameterProtos.isEmpty()) { mapOf() } else { val result = LinkedHashMap() for ((index, proto) in typeParameterProtos.withIndex()) { - result[proto.id] = LibraryTypeParameterSymbol(nameResolver.getName(proto.name)) + if (!proto.hasId()) continue + val name = nameResolver.getName(proto.name) + val symbol = FirTypeParameterSymbol() + FirTypeParameterImpl( + session, + null, + symbol, + name, + proto.variance.convertVariance(), + proto.reified + ) + result[proto.id] = symbol } result } + + init { + for ((index, proto) in typeParameterProtos.withIndex()) { + if (!proto.hasId()) continue + val symbol = typeParameterDescriptors[proto.id] as FirTypeParameterSymbol + val declaration = symbol.firUnsafe() + declaration.apply { + proto.upperBoundList.mapTo(bounds) { + FirResolvedTypeRefImpl(session, null, type(it), false, emptyList()) + } + } + } + } + val ownTypeParameters: List get() = typeParameterDescriptors.values.toList() diff --git a/compiler/fir/resolve/testData/builtIns/kotlin-collections.txt b/compiler/fir/resolve/testData/builtIns/kotlin-collections.txt index 0f7a1e4f04b..c0a53f4aaf7 100644 --- a/compiler/fir/resolve/testData/builtIns/kotlin-collections.txt +++ b/compiler/fir/resolve/testData/builtIns/kotlin-collections.txt @@ -25,7 +25,7 @@ public abstract class CharIterator : R|kotlin/collections/Iterator| } -public abstract interface Collection : R|kotlin/collections/Iterable| { +public abstract interface Collection : R|kotlin/collections/Iterable| { public abstract operator fun contains(element: R|E|): R|kotlin/Boolean| public abstract fun containsAll(elements: R|kotlin/collections/Collection|): R|kotlin/Boolean| @@ -63,19 +63,19 @@ public abstract class IntIterator : R|kotlin/collections/Iterator| { } -public abstract interface Iterable : R|kotlin/Any| { +public abstract interface Iterable : R|kotlin/Any| { public abstract operator fun iterator(): R|kotlin/collections/Iterator| } -public abstract interface Iterator : R|kotlin/Any| { +public abstract interface Iterator : R|kotlin/Any| { public abstract operator fun hasNext(): R|kotlin/Boolean| public abstract operator fun next(): R|T| } -public abstract interface List : R|kotlin/collections/Collection| { +public abstract interface List : R|kotlin/collections/Collection| { public abstract operator fun contains(element: R|E|): R|kotlin/Boolean| public abstract fun containsAll(elements: R|kotlin/collections/Collection|): R|kotlin/Boolean| @@ -98,7 +98,7 @@ public abstract interface List : R|kotlin/collections/Collection| { } -public abstract interface ListIterator : R|kotlin/collections/Iterator| { +public abstract interface ListIterator : R|kotlin/collections/Iterator| { public abstract operator fun hasNext(): R|kotlin/Boolean| public abstract fun hasPrevious(): R|kotlin/Boolean| @@ -122,7 +122,7 @@ public abstract class LongIterator : R|kotlin/collections/Iterator| } -public abstract interface Map : R|kotlin/Any| { +public abstract interface Map : R|kotlin/Any| { public abstract fun containsKey(key: R|K|): R|kotlin/Boolean| public abstract fun containsValue(value: R|V|): R|kotlin/Boolean| @@ -133,7 +133,7 @@ public abstract interface Map : R|kotlin/Any| { public abstract fun isEmpty(): R|kotlin/Boolean| - public abstract interface Entry : R|kotlin/Any| { + public abstract interface Entry : R|kotlin/Any| { } } @@ -155,12 +155,12 @@ public abstract interface MutableCollection : R|kotlin/collections/Collection } -public abstract interface MutableIterable : R|kotlin/collections/Iterable| { +public abstract interface MutableIterable : R|kotlin/collections/Iterable| { public abstract operator fun iterator(): R|kotlin/collections/MutableIterator| } -public abstract interface MutableIterator : R|kotlin/collections/Iterator| { +public abstract interface MutableIterator : R|kotlin/collections/Iterator| { public abstract fun remove(): R|kotlin/Unit| } @@ -242,7 +242,7 @@ public abstract interface MutableSet : R|kotlin/collections/Set|, R|kotlin } -public abstract interface Set : R|kotlin/collections/Collection| { +public abstract interface Set : R|kotlin/collections/Collection| { public abstract operator fun contains(element: R|E|): R|kotlin/Boolean| public abstract fun containsAll(elements: R|kotlin/collections/Collection|): R|kotlin/Boolean| diff --git a/compiler/fir/resolve/testData/builtIns/kotlin.txt b/compiler/fir/resolve/testData/builtIns/kotlin.txt index 1a5c6cf6772..6402b72bc20 100644 --- a/compiler/fir/resolve/testData/builtIns/kotlin.txt +++ b/compiler/fir/resolve/testData/builtIns/kotlin.txt @@ -1,6 +1,6 @@ -public final inline fun arrayOf(vararg elements: R|kotlin/Array|): R|kotlin/Array| +public final inline fun arrayOf(vararg elements: R|kotlin/Array|): R|kotlin/Array| -public final fun arrayOfNulls(size: R|kotlin/Int|): R|kotlin/Array| +public final fun arrayOfNulls(size: R|kotlin/Int|): R|kotlin/Array| public final fun booleanArrayOf(vararg elements: R|kotlin/BooleanArray|): R|kotlin/BooleanArray| @@ -10,11 +10,11 @@ public final fun charArrayOf(vararg elements: R|kotlin/CharArray|): R|kotlin/Cha public final fun doubleArrayOf(vararg elements: R|kotlin/DoubleArray|): R|kotlin/DoubleArray| -public final inline fun emptyArray(): R|kotlin/Array| +public final inline fun emptyArray(): R|kotlin/Array| -public final inline fun enumValueOf(name: R|kotlin/String|): R|T| +public final inline fun enumValueOf(name: R|kotlin/String|): R|T| -public final inline fun enumValues(): R|kotlin/Array| +public final inline fun enumValues(): R|kotlin/Array| public final fun floatArrayOf(vararg elements: R|kotlin/FloatArray|): R|kotlin/FloatArray| @@ -286,7 +286,7 @@ public abstract interface Cloneable : R|kotlin/Any| { } -public abstract interface Comparable : R|kotlin/Any| { +public abstract interface Comparable : R|kotlin/Any| { public abstract operator fun compareTo(other: R|T|): R|kotlin/Int| } @@ -589,7 +589,7 @@ public final class FloatArray : R|kotlin/Any| { } -public abstract interface Function : R|kotlin/Any| { +public abstract interface Function : R|kotlin/Any| { } public final class Int : R|kotlin/Number|, R|kotlin/Comparable| { diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/annotations/types/ClassLiteralArgument.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/annotations/types/ClassLiteralArgument.txt index eb44231dc54..17d66eecdf6 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/annotations/types/ClassLiteralArgument.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/annotations/types/ClassLiteralArgument.txt @@ -24,7 +24,7 @@ public final class Generic : R|kotlin/Any| { public final class InnerGeneric : R|kotlin/Any| { public constructor(): R|test/InnerGeneric| - public final inner class Inner : R|kotlin/Any| { + public final inner class Inner : R|kotlin/Any| { public constructor(): R|test/InnerGeneric.Inner| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/annotations/types/SupertypesAndBounds.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/annotations/types/SupertypesAndBounds.txt index 7ec93a11e6f..8f7c609f262 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/annotations/types/SupertypesAndBounds.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/annotations/types/SupertypesAndBounds.txt @@ -3,7 +3,7 @@ public final annotation class A : R|kotlin/Annotation| { } -public abstract interface Foo : R|java/io/Serializable| { - public abstract fun bar(): R|kotlin/Unit| +public abstract interface Foo : R|java/io/Serializable| { + public abstract fun bar(): R|kotlin/Unit| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassInParam.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassInParam.txt index 4eb2ed968a0..ae6f9cebaed 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassInParam.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassInParam.txt @@ -1,4 +1,4 @@ -public final class Wine : R|kotlin/Any| { +public final class Wine : R|kotlin/Any| { public constructor(): R|test/Wine| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassOutParam.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassOutParam.txt index fd806e6afa5..9f3affe5d31 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassOutParam.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassOutParam.txt @@ -1,4 +1,4 @@ -public final class Juice : R|kotlin/Any| { +public final class Juice : R|kotlin/Any| { public constructor(): R|test/Juice| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamReferencesParam.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamReferencesParam.txt index 7f373ff23b6..91599b43165 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamReferencesParam.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamReferencesParam.txt @@ -1,4 +1,4 @@ -public final class ClassParamReferencesParam : R|kotlin/Any| { +public final class ClassParamReferencesParam : R|kotlin/Any| { public constructor(): R|test/ClassParamReferencesParam| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamReferencesParam2.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamReferencesParam2.txt index 7f373ff23b6..e0adec23028 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamReferencesParam2.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamReferencesParam2.txt @@ -1,4 +1,4 @@ -public final class ClassParamReferencesParam : R|kotlin/Any| { +public final class ClassParamReferencesParam : R|kotlin/Any| { public constructor(): R|test/ClassParamReferencesParam| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamReferencesSelf.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamReferencesSelf.txt index 3e853b0110e..d520dbcdf22 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamReferencesSelf.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamReferencesSelf.txt @@ -1,4 +1,4 @@ -public final class ClassParamReferencesSelf : R|kotlin/Any| { +public final class ClassParamReferencesSelf|> : R|kotlin/Any| { public constructor(): R|test/ClassParamReferencesSelf| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamUpperClassBound.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamUpperClassBound.txt index fc12cacd96a..58cbc2caa15 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamUpperClassBound.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamUpperClassBound.txt @@ -1,4 +1,4 @@ -public final class Clock : R|kotlin/Any| { +public final class Clock : R|kotlin/Any| { public constructor(): R|test/Clock| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamUpperClassInterfaceBound.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamUpperClassInterfaceBound.txt index fc12cacd96a..a39f18227a0 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamUpperClassInterfaceBound.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamUpperClassInterfaceBound.txt @@ -1,4 +1,4 @@ -public final class Clock : R|kotlin/Any| { +public final class Clock : R|kotlin/Any| { public constructor(): R|test/Clock| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamUpperInterfaceBound.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamUpperInterfaceBound.txt index fc12cacd96a..daf74472fed 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamUpperInterfaceBound.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamUpperInterfaceBound.txt @@ -1,4 +1,4 @@ -public final class Clock : R|kotlin/Any| { +public final class Clock : R|kotlin/Any| { public constructor(): R|test/Clock| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassTwoParams2.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassTwoParams2.txt index 6de8e251b39..908a306eca1 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassTwoParams2.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassTwoParams2.txt @@ -1,4 +1,4 @@ -public final class ClassTwoParams : R|kotlin/Any| { +public final class ClassTwoParams : R|kotlin/Any| { public constructor(): R|test/ClassTwoParams| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/class/RecursiveGeneric.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/class/RecursiveGeneric.txt index 37c67f57a64..27b703e92ad 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/class/RecursiveGeneric.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/class/RecursiveGeneric.txt @@ -1,4 +1,4 @@ -public abstract interface Rec : R|kotlin/Any| { +public abstract interface Rec|> : R|kotlin/Any| { public abstract fun t(): R|T| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/classFun/ClassInParamUsedInFun.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/classFun/ClassInParamUsedInFun.txt index 558385893b6..2a7f5eee6af 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/classFun/ClassInParamUsedInFun.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/classFun/ClassInParamUsedInFun.txt @@ -1,4 +1,4 @@ -public final class ClassParamUsedInFun : R|kotlin/Any| { +public final class ClassParamUsedInFun : R|kotlin/Any| { public final fun f(t: R|T|): R|kotlin/Int| public constructor(): R|test/ClassParamUsedInFun| diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypePP.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypePP.txt index c8880bc0152..b0b26388370 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypePP.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypePP.txt @@ -1,4 +1,4 @@ -public final class ClassWithTypePP : R|kotlin/Any| { +public final class ClassWithTypePP : R|kotlin/Any| { public constructor(): R|test/ClassWithTypePP| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypePRefNext.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypePRefNext.txt index c0d18c4b568..473407f690e 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypePRefNext.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypePRefNext.txt @@ -1,4 +1,4 @@ -public open class ClassWithTypePRefNext : R|kotlin/Any| { +public open class ClassWithTypePRefNext|?, P> : R|kotlin/Any| { public constructor(): R|test/ClassWithTypePRefNext| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypePRefSelf.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypePRefSelf.txt index 272f57e4902..02d43304059 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypePRefSelf.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypePRefSelf.txt @@ -1,4 +1,4 @@ -public final class ClassWithTypePRefSelf

: R|kotlin/Any| { +public final class ClassWithTypePRefSelf

|> : R|kotlin/Any| { public constructor(): R|test/ClassWithTypePRefSelf

| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypePRefSelfAndClass.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypePRefSelfAndClass.txt index 142dfb3800e..7c097c14ba2 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypePRefSelfAndClass.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypePRefSelfAndClass.txt @@ -1,4 +1,4 @@ -public final class ClassWithTypePRefSelfAndClass

: R|kotlin/Any| { +public final class ClassWithTypePRefSelfAndClass

|?> : R|kotlin/Any| { public constructor(): R|test/ClassWithTypePRefSelfAndClass

| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/MethodTypePOneUpperBound.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/MethodTypePOneUpperBound.txt index 9b753be1dbe..c82394bb866 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/MethodTypePOneUpperBound.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/MethodTypePOneUpperBound.txt @@ -1,5 +1,5 @@ public open class MethodTypePOneUpperBound : R|kotlin/Any| { - public open fun bar(): R|kotlin/Unit| + public open fun bar(): R|kotlin/Unit| public constructor(): R|test/MethodTypePOneUpperBound| diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/MethodTypePTwoUpperBounds.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/MethodTypePTwoUpperBounds.txt index 83a9a30804a..de1f9c7b1f1 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/MethodTypePTwoUpperBounds.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/MethodTypePTwoUpperBounds.txt @@ -1,5 +1,5 @@ public open class MethodTypePTwoUpperBounds : R|kotlin/Any| { - public open fun foo(): R|kotlin/Unit| + public open fun foo(): R|kotlin/Unit| public constructor(): R|test/MethodTypePTwoUpperBounds| diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/MethodWithTypePP.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/MethodWithTypePP.txt index 4eece75ea21..88cf8a7d54a 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/MethodWithTypePP.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/MethodWithTypePP.txt @@ -1,5 +1,5 @@ public final class MethodWithTypePP : R|kotlin/Any| { - public final fun f(): R|kotlin/Unit| + public final fun f(): R|kotlin/Unit| public constructor(): R|test/MethodWithTypePP| diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/MethodWithTypePRefClassP.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/MethodWithTypePRefClassP.txt index a75678c6344..199f63d0432 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/MethodWithTypePRefClassP.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/MethodWithTypePRefClassP.txt @@ -1,5 +1,5 @@ public open class MethodWithTypePRefClassP

: R|kotlin/Any| { - public final fun f(): R|kotlin/Unit| + public final fun f(): R|kotlin/Unit| public constructor(): R|test/MethodWithTypePRefClassP

| diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/UnboundWildcard.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/UnboundWildcard.txt index c1968bcc282..5fec858f3a4 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/UnboundWildcard.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/UnboundWildcard.txt @@ -3,7 +3,7 @@ public final class UnboundWildcard : R|kotlin/Any| { public constructor(): R|test/UnboundWildcard| - public abstract interface MyClass : R|kotlin/Any| { + public abstract interface MyClass : R|kotlin/Any| { } } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/AllBoundsInWhen.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/AllBoundsInWhen.txt index e1b6b37326e..ab65d2f84a1 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/AllBoundsInWhen.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/AllBoundsInWhen.txt @@ -1,5 +1,5 @@ public open class AllBoundsInWhen : R|kotlin/Any| { - public open fun foo(): R|kotlin/Unit| + public open fun foo(): R|kotlin/Unit| public constructor(): R|test/AllBoundsInWhen| diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/MethodWithTypeParameters.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/MethodWithTypeParameters.txt index fd85755eabe..32f8096611d 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/MethodWithTypeParameters.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/MethodWithTypeParameters.txt @@ -1,5 +1,5 @@ public open class MethodWithTypeParameters : R|kotlin/Any| { - public open fun foo(a: R|A|, b: R|kotlin/collections/List|, c: R|kotlin/collections/MutableList|): R|kotlin/Unit| + public open fun |> foo(a: R|A|, b: R|kotlin/collections/List|, c: R|kotlin/collections/MutableList|): R|kotlin/Unit| public constructor(): R|test/MethodWithTypeParameters| diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/StarProjection.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/StarProjection.txt index fb26f90d9da..eab0f2b2f66 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/StarProjection.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/StarProjection.txt @@ -3,7 +3,7 @@ public final class StarProjection : R|kotlin/Any| { public constructor(): R|test/StarProjection| - public abstract interface MyClass : R|kotlin/Any| { + public abstract interface MyClass : R|kotlin/Any| { } } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/error/ExtraUpperBound.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/error/ExtraUpperBound.txt index 88b997fbb5c..2725d4030e7 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/error/ExtraUpperBound.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/error/ExtraUpperBound.txt @@ -1,5 +1,5 @@ public open class ExtraUpperBound : R|kotlin/Any| { - public open fun foo(): R|kotlin/String|? + public open fun foo(): R|kotlin/String|? public constructor(): R|test/ExtraUpperBound| diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/error/MissingUpperBound.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/error/MissingUpperBound.txt index 159a959295f..b14952be290 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/error/MissingUpperBound.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/error/MissingUpperBound.txt @@ -1,5 +1,5 @@ public open class MissingUpperBound : R|kotlin/Any| { - public open fun foo(): R|kotlin/String|? + public open fun foo(): R|kotlin/String|? public constructor(): R|test/MissingUpperBound| diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.txt index 9f61a2ce55f..e1fa026645e 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure1.txt @@ -1,5 +1,5 @@ public open class WrongTypeParameterBoundStructure1 : R|kotlin/Any| { - public open fun foo(p0: R|A|, p1: R|kotlin/collections/List|?): R|kotlin/Unit| + public open fun |?> foo(p0: R|A|, p1: R|kotlin/collections/List|?): R|kotlin/Unit| public constructor(): R|test/WrongTypeParameterBoundStructure1| diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.txt index 838ce30f000..d1209236813 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/error/WrongTypeParameterBoundStructure2.txt @@ -1,5 +1,5 @@ public open class WrongTypeParameterBoundStructure2 : R|kotlin/Any| { - public open fun foo(p0: R|A|, p1: R|kotlin/collections/List|?): R|kotlin/Unit| + public open fun |?> foo(p0: R|A|, p1: R|kotlin/collections/List|?): R|kotlin/Unit| public constructor(): R|test/WrongTypeParameterBoundStructure2| diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritMutability.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritMutability.txt index 7be336756e6..81834ccf342 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritMutability.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritMutability.txt @@ -1,11 +1,11 @@ public abstract interface InheritMutability : R|kotlin/Any| { public abstract interface Sub : R|test/InheritMutability.Super| { - public abstract fun foo(a: R|B|): R|kotlin/Unit| + public abstract fun |> foo(a: R|B|): R|kotlin/Unit| } public abstract interface Super : R|kotlin/Any| { - public abstract fun foo(a: R|A|): R|kotlin/Unit| + public abstract fun |> foo(a: R|A|): R|kotlin/Unit| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritNullability.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritNullability.txt index 31e77ec6777..e9ad78f3681 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritNullability.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritNullability.txt @@ -1,11 +1,11 @@ public abstract interface InheritNullability : R|kotlin/Any| { public abstract interface Sub : R|test/InheritNullability.Super| { - public abstract fun foo(a: R|B|): R|kotlin/Unit| + public abstract fun foo(a: R|B|): R|kotlin/Unit| } public abstract interface Super : R|kotlin/Any| { - public abstract fun foo(a: R|A|): R|kotlin/Unit| + public abstract fun foo(a: R|A|): R|kotlin/Unit| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritReadOnliness.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritReadOnliness.txt index fc8cb8be2e9..612ef5d590d 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritReadOnliness.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/InheritReadOnliness.txt @@ -1,11 +1,11 @@ public abstract interface InheritReadOnliness : R|kotlin/Any| { public abstract interface Sub : R|test/InheritReadOnliness.Super| { - public abstract fun foo(a: R|B|): R|kotlin/Unit| + public abstract fun |> foo(a: R|B|): R|kotlin/Unit| } public abstract interface Super : R|kotlin/Any| { - public abstract fun foo(a: R|A|): R|kotlin/Unit| + public abstract fun |> foo(a: R|A|): R|kotlin/Unit| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoBounds.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoBounds.txt index 79f8fe4830e..4910323e766 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoBounds.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoBounds.txt @@ -1,11 +1,11 @@ public abstract interface TwoBounds : R|kotlin/Any| { public abstract interface Sub : R|test/TwoBounds.Super| { - public abstract fun foo(a: R|B|): R|kotlin/Unit| + public abstract fun foo(a: R|B|): R|kotlin/Unit| } public abstract interface Super : R|kotlin/Any| { - public abstract fun foo(a: R|A|): R|kotlin/Unit| + public abstract fun foo(a: R|A|): R|kotlin/Unit| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.txt index e1f2b598af6..9fa399d057d 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoSuperclasses.txt @@ -1,16 +1,16 @@ public abstract interface TwoSuperclasses : R|kotlin/Any| { public abstract interface Sub : R|test/TwoSuperclasses.Super1|, R|test/TwoSuperclasses.Super2| { - public abstract fun foo(a: R|C|): R|kotlin/Unit| + public abstract fun foo(a: R|C|): R|kotlin/Unit| } public abstract interface Super1 : R|kotlin/Any| { - public abstract fun foo(a: R|A|): R|kotlin/Unit| + public abstract fun foo(a: R|A|): R|kotlin/Unit| } public abstract interface Super2 : R|kotlin/Any| { - public abstract fun foo(a: R|B|): R|kotlin/Unit| + public abstract fun foo(a: R|B|): R|kotlin/Unit| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.txt index 54bdebbc0fc..6436a0cb965 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/TwoTypeParameters.txt @@ -1,11 +1,11 @@ public abstract interface TwoTypeParameters : R|kotlin/Any| { public abstract interface Sub : R|test/TwoTypeParameters.Super| { - public abstract fun foo(a: R|B|, b: R|A|): R|kotlin/Unit| + public abstract fun foo(a: R|B|, b: R|A|): R|kotlin/Unit| } public abstract interface Super : R|kotlin/Any| { - public abstract fun foo(a: R|A|, b: R|B|): R|kotlin/Unit| + public abstract fun foo(a: R|A|, b: R|B|): R|kotlin/Unit| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.txt index ceb845c0d70..189b2605b25 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterAsUpperBound.txt @@ -1,11 +1,11 @@ public abstract interface UseParameterAsUpperBound : R|kotlin/Any| { public abstract interface Sub : R|test/UseParameterAsUpperBound.Super| { - public abstract fun foo(a: R|B|, b: R|A|): R|kotlin/Unit| + public abstract fun foo(a: R|B|, b: R|A|): R|kotlin/Unit| } public abstract interface Super : R|kotlin/Any| { - public abstract fun foo(a: R|A|, b: R|B|): R|kotlin/Unit| + public abstract fun foo(a: R|A|, b: R|B|): R|kotlin/Unit| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.txt index 85d5e1c7708..78c1960b798 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBound.txt @@ -1,11 +1,11 @@ public abstract interface UseParameterInUpperBound : R|kotlin/Any| { public abstract interface Sub : R|test/UseParameterInUpperBound.Super| { - public abstract fun foo(a: R|B|, b: R|A|): R|kotlin/Unit| + public abstract fun |> foo(a: R|B|, b: R|A|): R|kotlin/Unit| } public abstract interface Super : R|kotlin/Any| { - public abstract fun foo(a: R|A|, b: R|B|): R|kotlin/Unit| + public abstract fun |> foo(a: R|A|, b: R|B|): R|kotlin/Unit| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.txt index 8864547b201..e4625cfda44 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/propagation/typeParameter/UseParameterInUpperBoundWithKotlinSignature.txt @@ -1,11 +1,11 @@ public abstract interface UseParameterInUpperBoundWithKotlinSignature : R|kotlin/Any| { public abstract interface Sub : R|test/UseParameterInUpperBoundWithKotlinSignature.Super| { - public abstract fun foo(b: R|B|, a: R|A|): R|kotlin/Unit| + public abstract fun |> foo(b: R|B|, a: R|A|): R|kotlin/Unit| } public abstract interface Super : R|kotlin/Any| { - public abstract fun foo(a: R|A|, b: R|B|): R|kotlin/Unit| + public abstract fun |> foo(a: R|A|, b: R|B|): R|kotlin/Unit| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/library/Max.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/library/Max.txt index f75467b993d..60abaf444ca 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/library/Max.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/library/Max.txt @@ -1,5 +1,5 @@ public open class Max : R|kotlin/Any| { - public open fun max(p0: R|kotlin/collections/Collection|?): R|T| + public open fun |?> max(p0: R|kotlin/collections/Collection|?): R|T| public constructor(): R|test/Max| diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fun/genericWithTypeVariables/FunParamReferencesParam.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fun/genericWithTypeVariables/FunParamReferencesParam.txt index 69ec79eeeec..c398b0f2773 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fun/genericWithTypeVariables/FunParamReferencesParam.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fun/genericWithTypeVariables/FunParamReferencesParam.txt @@ -1 +1,2 @@ -public final fun funParamReferencesParam(): R|kotlin/Int| +public final fun funParamReferencesParam(): R|kotlin/Int| + diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fun/genericWithTypeVariables/FunParamTwoUpperBounds.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fun/genericWithTypeVariables/FunParamTwoUpperBounds.txt index 97f26433ea5..0cb15b21133 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fun/genericWithTypeVariables/FunParamTwoUpperBounds.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fun/genericWithTypeVariables/FunParamTwoUpperBounds.txt @@ -1,4 +1,4 @@ -public final fun foo(): R|kotlin/Unit| +public final fun foo(): R|kotlin/Unit| public abstract interface Bar : R|kotlin/Any| { } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassBound.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassBound.txt index 61a8936c787..8bcc172bfde 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassBound.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassBound.txt @@ -1 +1,2 @@ -public final fun uno(): R|kotlin/Int| +public final fun uno(): R|kotlin/Int| + diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassInterfaceBound.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassInterfaceBound.txt index e79087fdac7..6d795460861 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassInterfaceBound.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fun/genericWithTypeVariables/FunParamUpperClassInterfaceBound.txt @@ -1 +1,2 @@ -public final fun tres(): R|kotlin/Int| +public final fun tres(): R|kotlin/Int| + diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fun/genericWithTypeVariables/FunParamUpperInterfaceBound.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fun/genericWithTypeVariables/FunParamUpperInterfaceBound.txt index 07d34cac557..31aae2f2732 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fun/genericWithTypeVariables/FunParamUpperInterfaceBound.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fun/genericWithTypeVariables/FunParamUpperInterfaceBound.txt @@ -1 +1,2 @@ -public final fun dos(): R|kotlin/Int| +public final fun dos(): R|kotlin/Int| + diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/nested/InnerClassReferencesOuterTP.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/nested/InnerClassReferencesOuterTP.txt index ce11b748a28..7b25795544b 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/nested/InnerClassReferencesOuterTP.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/nested/InnerClassReferencesOuterTP.txt @@ -1,7 +1,7 @@ public final class InnerClassReferencesOuterTP

: R|kotlin/Any| { public constructor(): R|test/InnerClassReferencesOuterTP

| - public final inner class Inner : R|kotlin/Any| { + public final inner class Inner : R|kotlin/Any| { public constructor(): R|test/InnerClassReferencesOuterTP.Inner| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/nested/MembersReferenceOuterTP.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/nested/MembersReferenceOuterTP.txt index fc646c4f627..364310a40a3 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/nested/MembersReferenceOuterTP.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/nested/MembersReferenceOuterTP.txt @@ -2,7 +2,7 @@ public final class MembersReferenceOuterTP

: R|kotlin/Any| { public constructor(): R|test/MembersReferenceOuterTP

| public final inner class Inner : R|kotlin/Any| { - public final fun f(): R|kotlin/Unit| + public final fun f(): R|kotlin/Unit| public final fun g(p: R|P|): R|P| diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/visibility/PrivateToThis.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/visibility/PrivateToThis.txt index 1867a6288b0..3a4158db385 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/visibility/PrivateToThis.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/visibility/PrivateToThis.txt @@ -1,4 +1,4 @@ -public final class A : R|kotlin/Any| { +public final class A : R|kotlin/Any| { private/*private to this*/ final fun bas(): R|I| public constructor(): R|test/A| diff --git a/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointCompareTo.fir.txt b/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointCompareTo.fir.txt index b5486ad2190..5c3afc3e806 100644 --- a/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointCompareTo.fir.txt +++ b/compiler/testData/ir/irText/expressions/floatingPointComparisons/floatingPointCompareTo.fir.txt @@ -4,7 +4,7 @@ FILE fqName: fileName:/floatingPointCompareTo.kt VALUE_PARAMETER name:y index:1 type:kotlin.Double BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1d (x: kotlin.Double, y: kotlin.Double): IrErrorType declared in ' - ERROR_CALL 'Unresolved reference: #' type=IrErrorType + ERROR_CALL 'Unresolved reference: #' type=IrErrorType GET_VAR 'y: kotlin.Double declared in .test1d' type=kotlin.Double origin=null FUN name:test2d visibility:public modality:FINAL <> (x:kotlin.Double, y:kotlin.Any) returnType:kotlin.Boolean VALUE_PARAMETER name:x index:0 type:kotlin.Double @@ -16,7 +16,7 @@ FILE fqName: fileName:/floatingPointCompareTo.kt if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Double GET_VAR 'y: kotlin.Any declared in .test2d' type=kotlin.Any origin=null then: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: ERROR_CALL 'Unresolved reference: #' type=IrErrorType + arg0: ERROR_CALL 'Unresolved reference: #' type=IrErrorType GET_VAR 'y: kotlin.Any declared in .test2d' type=kotlin.Any origin=null arg1: CONST Int type=kotlin.Boolean value=0 BRANCH @@ -50,7 +50,7 @@ FILE fqName: fileName:/floatingPointCompareTo.kt VALUE_PARAMETER name:y index:1 type:kotlin.Float BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1f (x: kotlin.Float, y: kotlin.Float): IrErrorType declared in ' - ERROR_CALL 'Unresolved reference: #' type=IrErrorType + ERROR_CALL 'Unresolved reference: #' type=IrErrorType GET_VAR 'y: kotlin.Float declared in .test1f' type=kotlin.Float origin=null FUN name:test2f visibility:public modality:FINAL <> (x:kotlin.Float, y:kotlin.Any) returnType:kotlin.Boolean VALUE_PARAMETER name:x index:0 type:kotlin.Float @@ -62,7 +62,7 @@ FILE fqName: fileName:/floatingPointCompareTo.kt if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Float GET_VAR 'y: kotlin.Any declared in .test2f' type=kotlin.Any origin=null then: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: ERROR_CALL 'Unresolved reference: #' type=IrErrorType + arg0: ERROR_CALL 'Unresolved reference: #' type=IrErrorType GET_VAR 'y: kotlin.Any declared in .test2f' type=kotlin.Any origin=null arg1: CONST Int type=kotlin.Boolean value=0 BRANCH @@ -141,7 +141,7 @@ FILE fqName: fileName:/floatingPointCompareTo.kt VALUE_PARAMETER name:x index:0 type:kotlin.Float BLOCK_BODY RETURN type=kotlin.Nothing from='public final fun test1fr (x: kotlin.Float): IrErrorType declared in ' - ERROR_CALL 'Unresolved reference: #' type=IrErrorType + ERROR_CALL 'Unresolved reference: #' type=IrErrorType GET_VAR 'x: kotlin.Float declared in .test1fr' type=kotlin.Float origin=null FUN name:test2fr visibility:public modality:FINAL <> (x:kotlin.Any) returnType:kotlin.Boolean VALUE_PARAMETER name:x index:0 type:kotlin.Any @@ -152,7 +152,7 @@ FILE fqName: fileName:/floatingPointCompareTo.kt if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Float GET_VAR 'x: kotlin.Any declared in .test2fr' type=kotlin.Any origin=null then: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: ERROR_CALL 'Unresolved reference: #' type=IrErrorType + arg0: ERROR_CALL 'Unresolved reference: #' type=IrErrorType GET_VAR 'x: kotlin.Any declared in .test2fr' type=kotlin.Any origin=null arg1: CONST Int type=kotlin.Boolean value=0 BRANCH @@ -167,7 +167,7 @@ FILE fqName: fileName:/floatingPointCompareTo.kt if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Double GET_VAR 'x: kotlin.Any declared in .test3fr' type=kotlin.Any origin=null then: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ - arg0: ERROR_CALL 'Unresolved reference: #' type=IrErrorType + arg0: ERROR_CALL 'Unresolved reference: #' type=IrErrorType GET_VAR 'x: kotlin.Any declared in .test3fr' type=kotlin.Any origin=null arg1: CONST Int type=kotlin.Boolean value=0 BRANCH diff --git a/compiler/testData/ir/irText/expressions/kt30020.fir.txt b/compiler/testData/ir/irText/expressions/kt30020.fir.txt index 0bcbf8e361c..9308ed6dbd1 100644 --- a/compiler/testData/ir/irText/expressions/kt30020.fir.txt +++ b/compiler/testData/ir/irText/expressions/kt30020.fir.txt @@ -102,87 +102,87 @@ FILE fqName: fileName:/kt30020.kt overridden: public open fun toString (): kotlin.String declared in kotlin.Any $this: VALUE_PARAMETER name: type:kotlin.Any - FUN FAKE_OVERRIDE name:add visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, element:E of ) returnType:kotlin.Boolean + FUN FAKE_OVERRIDE name:add visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, element:kotlin.Int) returnType:kotlin.Boolean overridden: public abstract fun add (element: E of ): kotlin.Boolean declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList - VALUE_PARAMETER name:element index:0 type:E of - FUN FAKE_OVERRIDE name:addAll visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, index:kotlin.Int, elements:kotlin.collections.Collection>) returnType:kotlin.Boolean + VALUE_PARAMETER name:element index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:addAll visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, index:kotlin.Int, elements:kotlin.collections.Collection) returnType:kotlin.Boolean overridden: public abstract fun addAll (index: kotlin.Int, elements: kotlin.collections.Collection>): kotlin.Boolean declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList VALUE_PARAMETER name:index index:0 type:kotlin.Int - VALUE_PARAMETER name:elements index:1 type:kotlin.collections.Collection> + VALUE_PARAMETER name:elements index:1 type:kotlin.collections.Collection FUN FAKE_OVERRIDE name:clear visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList) returnType:kotlin.Unit overridden: public abstract fun clear (): kotlin.Unit declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList - FUN FAKE_OVERRIDE name:listIterator visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList) returnType:kotlin.collections.MutableListIterator> + FUN FAKE_OVERRIDE name:listIterator visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList) returnType:kotlin.collections.MutableListIterator overridden: public abstract fun listIterator (): kotlin.collections.MutableListIterator> declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList - FUN FAKE_OVERRIDE name:remove visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, element:E of ) returnType:kotlin.Boolean + FUN FAKE_OVERRIDE name:remove visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, element:kotlin.Int) returnType:kotlin.Boolean overridden: public abstract fun remove (element: E of ): kotlin.Boolean declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList - VALUE_PARAMETER name:element index:0 type:E of - FUN FAKE_OVERRIDE name:removeAll visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, elements:kotlin.collections.Collection>) returnType:kotlin.Boolean + VALUE_PARAMETER name:element index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:removeAll visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, elements:kotlin.collections.Collection) returnType:kotlin.Boolean overridden: public abstract fun removeAll (elements: kotlin.collections.Collection>): kotlin.Boolean declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList - VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection> - FUN FAKE_OVERRIDE name:removeAt visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, index:kotlin.Int) returnType:E of + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection + FUN FAKE_OVERRIDE name:removeAt visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, index:kotlin.Int) returnType:kotlin.Int overridden: public abstract fun removeAt (index: kotlin.Int): E of declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList VALUE_PARAMETER name:index index:0 type:kotlin.Int - FUN FAKE_OVERRIDE name:retainAll visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, elements:kotlin.collections.Collection>) returnType:kotlin.Boolean + FUN FAKE_OVERRIDE name:retainAll visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, elements:kotlin.collections.Collection) returnType:kotlin.Boolean overridden: public abstract fun retainAll (elements: kotlin.collections.Collection>): kotlin.Boolean declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList - VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection> - FUN FAKE_OVERRIDE name:set visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, index:kotlin.Int, element:E of ) returnType:E of + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection + FUN FAKE_OVERRIDE name:set visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, index:kotlin.Int, element:kotlin.Int) returnType:kotlin.Int overridden: public abstract fun set (index: kotlin.Int, element: E of ): E of declared in kotlin.collections.MutableList $this: VALUE_PARAMETER name: type:kotlin.collections.MutableList VALUE_PARAMETER name:index index:0 type:kotlin.Int - VALUE_PARAMETER name:element index:1 type:E of - FUN FAKE_OVERRIDE name:subList visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, fromIndex:kotlin.Int, toIndex:kotlin.Int) returnType:kotlin.collections.MutableList> + VALUE_PARAMETER name:element index:1 type:kotlin.Int + FUN FAKE_OVERRIDE name:subList visibility:public modality:ABSTRACT <> ($this:kotlin.collections.MutableList, fromIndex:kotlin.Int, toIndex:kotlin.Int) returnType:kotlin.collections.MutableList overridden: public abstract fun subList (fromIndex: kotlin.Int, toIndex: kotlin.Int): kotlin.collections.MutableList> declared in kotlin.collections.MutableList $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 - FUN FAKE_OVERRIDE name:contains visibility:public modality:ABSTRACT <> ($this:.List, element:E of ) returnType:kotlin.Boolean + FUN FAKE_OVERRIDE name:contains visibility:public modality:ABSTRACT <> ($this:.List, element:kotlin.Int) returnType:kotlin.Boolean overridden: public abstract fun contains (element: E of ): kotlin.Boolean declared in .List $this: VALUE_PARAMETER name: type:.List - VALUE_PARAMETER name:element index:0 type:E of - FUN FAKE_OVERRIDE name:contains visibility:public modality:ABSTRACT <> ($this:kotlin.collections.Collection, element:E of ) returnType:kotlin.Boolean + VALUE_PARAMETER name:element index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:contains visibility:public modality:ABSTRACT <> ($this:kotlin.collections.Collection, element:kotlin.Int) returnType:kotlin.Boolean overridden: public abstract fun contains (element: E of ): kotlin.Boolean declared in kotlin.collections.Collection $this: VALUE_PARAMETER name: type:kotlin.collections.Collection - VALUE_PARAMETER name:element index:0 type:E of - FUN FAKE_OVERRIDE name:containsAll visibility:public modality:ABSTRACT <> ($this:.List, elements:kotlin.collections.Collection>) returnType:kotlin.Boolean + VALUE_PARAMETER name:element index:0 type:kotlin.Int + FUN FAKE_OVERRIDE name:containsAll visibility:public modality:ABSTRACT <> ($this:.List, elements:kotlin.collections.Collection) returnType:kotlin.Boolean overridden: public abstract fun containsAll (elements: kotlin.collections.Collection>): kotlin.Boolean declared in .List $this: VALUE_PARAMETER name: type:.List - VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection> - FUN FAKE_OVERRIDE name:containsAll visibility:public modality:ABSTRACT <> ($this:kotlin.collections.Collection, elements:kotlin.collections.Collection>) returnType:kotlin.Boolean + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection + FUN FAKE_OVERRIDE name:containsAll visibility:public modality:ABSTRACT <> ($this:kotlin.collections.Collection, elements:kotlin.collections.Collection) returnType:kotlin.Boolean overridden: public abstract fun containsAll (elements: kotlin.collections.Collection>): kotlin.Boolean declared in kotlin.collections.Collection $this: VALUE_PARAMETER name: type:kotlin.collections.Collection - VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection> - FUN FAKE_OVERRIDE name:get visibility:public modality:ABSTRACT <> ($this:.List, index:kotlin.Int) returnType:E of + VALUE_PARAMETER name:elements index:0 type:kotlin.collections.Collection + FUN FAKE_OVERRIDE name:get visibility:public modality:ABSTRACT <> ($this:.List, index:kotlin.Int) returnType:kotlin.Int overridden: public abstract fun get (index: kotlin.Int): E of declared in .List $this: VALUE_PARAMETER name: type:.List VALUE_PARAMETER name:index index:0 type:kotlin.Int - FUN FAKE_OVERRIDE name:indexOf visibility:public modality:ABSTRACT <> ($this:.List, element:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:indexOf visibility:public modality:ABSTRACT <> ($this:.List, element:kotlin.Int) returnType:kotlin.Int overridden: public abstract fun indexOf (element: E of ): kotlin.Int declared in .List $this: VALUE_PARAMETER name: type:.List - VALUE_PARAMETER name:element index:0 type:E of + VALUE_PARAMETER name:element index:0 type:kotlin.Int FUN FAKE_OVERRIDE name:isEmpty visibility:public modality:ABSTRACT <> ($this:.List) returnType:kotlin.Boolean overridden: public abstract fun isEmpty (): kotlin.Boolean declared in .List @@ -191,19 +191,19 @@ FILE fqName: fileName:/kt30020.kt overridden: public abstract fun isEmpty (): kotlin.Boolean declared in kotlin.collections.Collection $this: VALUE_PARAMETER name: type:kotlin.collections.Collection - FUN FAKE_OVERRIDE name:iterator visibility:public modality:ABSTRACT <> ($this:.List) returnType:kotlin.collections.Iterator> + FUN FAKE_OVERRIDE name:iterator visibility:public modality:ABSTRACT <> ($this:.List) returnType:kotlin.collections.Iterator overridden: public abstract fun iterator (): kotlin.collections.Iterator> declared in .List $this: VALUE_PARAMETER name: type:.List - FUN FAKE_OVERRIDE name:iterator visibility:public modality:ABSTRACT <> ($this:.MutableCollection) returnType:kotlin.collections.MutableIterator> + FUN FAKE_OVERRIDE name:iterator visibility:public modality:ABSTRACT <> ($this:.MutableCollection) returnType:kotlin.collections.MutableIterator overridden: public abstract fun iterator (): kotlin.collections.MutableIterator> declared in .MutableCollection $this: VALUE_PARAMETER name: type:.MutableCollection - FUN FAKE_OVERRIDE name:lastIndexOf visibility:public modality:ABSTRACT <> ($this:.List, element:E of ) returnType:kotlin.Int + FUN FAKE_OVERRIDE name:lastIndexOf visibility:public modality:ABSTRACT <> ($this:.List, element:kotlin.Int) returnType:kotlin.Int overridden: public abstract fun lastIndexOf (element: E of ): kotlin.Int declared in .List $this: VALUE_PARAMETER name: type:.List - VALUE_PARAMETER name:element index:0 type:E of + VALUE_PARAMETER name:element index:0 type:kotlin.Int FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean overridden: public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in kotlin.Any diff --git a/compiler/testData/ir/irText/expressions/when.fir.txt b/compiler/testData/ir/irText/expressions/when.fir.txt index f4e6c42e3f6..7347747d378 100644 --- a/compiler/testData/ir/irText/expressions/when.fir.txt +++ b/compiler/testData/ir/irText/expressions/when.fir.txt @@ -44,8 +44,8 @@ FILE fqName: fileName:/when.kt GET_VAR 'val tmp0_subject: kotlin.Any? [val] declared in .testWithSubject' type=kotlin.Any? origin=null then: CONST String type=kotlin.String value="!Number" BRANCH - if: ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'val tmp0_subject: kotlin.Any? [val] declared in .testWithSubject' type=kotlin.Any? origin=null + if: CALL 'public abstract fun contains (element: E of ): kotlin.Boolean declared in kotlin.collections.Set' type=kotlin.Boolean origin=null + element: GET_VAR 'val tmp0_subject: kotlin.Any? [val] declared in .testWithSubject' type=kotlin.Any? origin=null then: CONST String type=kotlin.String value="nothingness?" BRANCH if: CONST Boolean type=kotlin.Boolean value=true @@ -74,8 +74,8 @@ FILE fqName: fileName:/when.kt GET_VAR 'x: kotlin.Any? declared in .test' type=kotlin.Any? origin=null then: CONST String type=kotlin.String value="!Number" BRANCH - if: ERROR_CALL 'Unresolved reference: #' type=IrErrorType - GET_VAR 'x: kotlin.Any? declared in .test' type=kotlin.Any? origin=null + if: CALL 'public abstract fun contains (element: E of ): kotlin.Boolean declared in kotlin.collections.Set' type=kotlin.Boolean origin=null + element: GET_VAR 'x: kotlin.Any? declared in .test' type=kotlin.Any? origin=null then: CONST String type=kotlin.String value="nothingness?" BRANCH if: CONST Boolean type=kotlin.Boolean value=true