From aa077b42e97ed32e07bdca42cf2cac5b158396a4 Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Thu, 18 Apr 2019 18:18:10 +0300 Subject: [PATCH] FIR deserializer: provide type-parameters for constructors --- .../deserialization/ClassDeserialization.kt | 14 ++---------- .../deserialization/FirMemberDeserializer.kt | 22 ++++++++++++++++++- .../fir/resolve/testData/builtIns/kotlin.txt | 4 ++-- .../types/ClassLiteralArgument.txt | 6 ++--- .../loadCompiledKotlin/class/ClassInParam.txt | 2 +- .../class/ClassMemberConflict.txt | 4 ++-- .../class/ClassOutParam.txt | 2 +- .../loadCompiledKotlin/class/ClassParam.txt | 2 +- .../class/ClassParamReferencesParam.txt | 2 +- .../class/ClassParamReferencesParam2.txt | 2 +- .../class/ClassParamReferencesSelf.txt | 2 +- .../class/ClassParamUpperClassBound.txt | 2 +- .../ClassParamUpperClassInterfaceBound.txt | 2 +- .../class/ClassParamUpperInterfaceBound.txt | 2 +- .../class/ClassTwoParams.txt | 2 +- .../class/ClassTwoParams2.txt | 2 +- .../class/InheritClassWithParam.txt | 2 +- .../class/InnerGenericClass.txt | 2 +- .../loadCompiledKotlin/class/InnerTypes.txt | 6 ++--- .../class/NestedGenericClass.txt | 2 +- .../javaBean/JavaBeanVarOfGenericType.txt | 2 +- .../classFun/ClassInParamUsedInFun.txt | 2 +- .../classFun/ClassParamUsedInFun.txt | 2 +- .../classFun/FunInParamSuper.txt | 2 +- .../ConstructorWithTwoTypeParameters.txt | 2 +- ...oTypeParametersAndOneIntValueParameter.txt | 2 +- ...TwoTypeParametersAndOnePValueParameter.txt | 2 +- .../ConstructorWithTypeParameter.txt | 2 +- ...thTypeParametersEAndOnePValueParameter.txt | 2 +- .../fromLoadJava/ClassWithTypeP.txt | 2 +- .../ClassWithTypePExtendsIterableP.txt | 2 +- .../fromLoadJava/ClassWithTypePP.txt | 2 +- .../fromLoadJava/ClassWithTypePRefNext.txt | 2 +- .../fromLoadJava/ClassWithTypePRefSelf.txt | 2 +- .../ClassWithTypePRefSelfAndClass.txt | 2 +- .../fromLoadJava/MethodWithTypePRefClassP.txt | 2 +- .../ConstructorWithNewTypeParams.txt | 2 +- .../ConstructorWithParentTypeParams.txt | 2 +- .../kotlinSignature/PropertyArrayTypes.txt | 2 +- .../kotlinSignature/PropertyComplexTypes.txt | 2 +- .../nested/DeepInnerGeneric.txt | 8 +++---- .../nested/InnerClassReferencesOuterTP.txt | 4 ++-- .../nested/MembersReferenceOuterTP.txt | 2 +- .../prop/ExtValIntTInClass.txt | 2 +- .../prop/ExtValIntTQInClass.txt | 2 +- .../prop/ExtValTIntInClass.txt | 2 +- .../prop/ExtVarIntTInClass.txt | 2 +- .../prop/ExtVarIntTQInClass.txt | 2 +- .../prop/ExtVarTIntInClass.txt | 2 +- .../prop/ExtVarTQIntInClass.txt | 2 +- .../prop/VarWithDelegated.txt | 2 +- .../typealias/TypeAliasToExtension.txt | 2 +- .../visibility/PrivateToThis.txt | 2 +- 53 files changed, 84 insertions(+), 74 deletions(-) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/deserialization/ClassDeserialization.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/deserialization/ClassDeserialization.kt index 1e6a8f80d6f..ef818d3bffc 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/deserialization/ClassDeserialization.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/deserialization/ClassDeserialization.kt @@ -66,20 +66,10 @@ fun deserializeClassToSymbol( // TODO: properties addDeclarations(classProto.functionList.map(classDeserializer::loadFunction)) - val delegatedSelfType = FirResolvedTypeRefImpl( - session, - null, - ConeClassTypeImpl( - symbol.toLookupTag(), - typeParameters.map { ConeTypeParameterTypeImpl(it.symbol, false) }.toTypedArray(), - false - ), - isMarkedNullable = false, - annotations = emptyList() - ) + addDeclarations( classProto.constructorList.map { - classDeserializer.loadConstructor(it, delegatedSelfType) + classDeserializer.loadConstructor(it, this) } ) 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 f58fd53d013..d6ad334f492 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 @@ -163,12 +163,31 @@ class FirMemberDeserializer(private val c: FirDeserializationContext) { } } - fun loadConstructor(proto: ProtoBuf.Constructor, delegatedSelfType: FirTypeRef): FirConstructor { + fun loadConstructor(proto: ProtoBuf.Constructor, klass: FirRegularClass): FirConstructor { val flags = proto.flags val relativeClassName = c.relativeClassName!! val symbol = FirFunctionSymbol(CallableId(c.packageFqName, relativeClassName, relativeClassName.shortName())) val local = c.childContext(emptyList()) val isPrimary = !Flags.IS_SECONDARY.get(flags) + + val typeParameters = klass.typeParameters.map { + FirTypeParameterImpl(c.session, null, FirTypeParameterSymbol(), it.name, Variance.INVARIANT, false).apply { + bounds.addAll(it.bounds) + } + } + + val delegatedSelfType = FirResolvedTypeRefImpl( + c.session, + null, + ConeClassTypeImpl( + klass.symbol.toLookupTag(), + typeParameters.map { ConeTypeParameterTypeImpl(it.symbol, false) }.toTypedArray(), + false + ), + isMarkedNullable = false, + annotations = emptyList() + ) + return if (isPrimary) { FirPrimaryConstructorImpl( c.session, @@ -192,6 +211,7 @@ class FirMemberDeserializer(private val c: FirDeserializationContext) { null ) }.apply { + this.typeParameters += typeParameters valueParameters += local.memberDeserializer.valueParameters(proto.valueParameterList) annotations += getAnnotations(proto, flags, AnnotatedCallableKind.FUNCTION) } diff --git a/compiler/fir/resolve/testData/builtIns/kotlin.txt b/compiler/fir/resolve/testData/builtIns/kotlin.txt index 4c7bca7aab2..d3da99e853f 100644 --- a/compiler/fir/resolve/testData/builtIns/kotlin.txt +++ b/compiler/fir/resolve/testData/builtIns/kotlin.txt @@ -49,7 +49,7 @@ public final class Array : R|kotlin/Any| { public final operator fun set(index: R|kotlin/Int|, value: R|T|): R|kotlin/Unit| - public constructor(size: R|kotlin/Int|, init: R|kotlin/Function1|): R|kotlin/Array| + public constructor(size: R|kotlin/Int|, init: R|kotlin/Function1|): R|kotlin/Array| } @@ -446,7 +446,7 @@ public abstract class Enum : R|kotlin/Comparable| { public open fun toString(): R|kotlin/String| - public constructor(name: R|kotlin/String|, ordinal: R|kotlin/Int|): R|kotlin/Enum| + public constructor(name: R|kotlin/String|, ordinal: R|kotlin/Int|): R|kotlin/Enum| public final companion object Companion : R|kotlin/Any| { private constructor(): R|kotlin/Enum.Companion| diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/annotations/types/ClassLiteralArgument.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/annotations/types/ClassLiteralArgument.txt index 17d66eecdf6..ab3e65863ef 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/annotations/types/ClassLiteralArgument.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/annotations/types/ClassLiteralArgument.txt @@ -17,15 +17,15 @@ public final annotation class Ann : R|kotlin/Annotation| { } public final class Generic : R|kotlin/Any| { - public constructor(): R|test/Generic| + public constructor(): R|test/Generic| } public final class InnerGeneric : R|kotlin/Any| { - public constructor(): R|test/InnerGeneric| + public constructor(): R|test/InnerGeneric| public final inner class Inner : R|kotlin/Any| { - public constructor(): R|test/InnerGeneric.Inner| + public constructor(): R|test/InnerGeneric.Inner| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassInParam.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassInParam.txt index ae6f9cebaed..30a205058bf 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 constructor(): R|test/Wine| + public constructor(): R|test/Wine| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassMemberConflict.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassMemberConflict.txt index 7c5c5a63146..b89d354e350 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassMemberConflict.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassMemberConflict.txt @@ -1,5 +1,5 @@ public final class ConstructorTypeParamClassObjectConflict : R|kotlin/Any| { - public constructor(): R|test/ConstructorTypeParamClassObjectConflict| + public constructor(): R|test/ConstructorTypeParamClassObjectConflict| public final companion object Companion : R|kotlin/Any| { private constructor(): R|test/ConstructorTypeParamClassObjectConflict.Companion| @@ -9,7 +9,7 @@ public final class ConstructorTypeParamClassObjectConflict : R|kotlin/Any| } public final class ConstructorTypeParamClassObjectTypeConflict : R|kotlin/Any| { - public constructor(): R|test/ConstructorTypeParamClassObjectTypeConflict| + public constructor(): R|test/ConstructorTypeParamClassObjectTypeConflict| public final companion object Companion : R|kotlin/Any| { private constructor(): R|test/ConstructorTypeParamClassObjectTypeConflict.Companion| diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassOutParam.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassOutParam.txt index 9f3affe5d31..88b09545e9d 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 constructor(): R|test/Juice| + public constructor(): R|test/Juice| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParam.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParam.txt index 5880bdf26d0..8e9a1ce634e 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParam.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParam.txt @@ -1,4 +1,4 @@ public final class Beer : R|kotlin/Any| { - public constructor(): R|test/Beer| + public constructor(): R|test/Beer| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamReferencesParam.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamReferencesParam.txt index 91599b43165..f15fd4cd8fe 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 constructor(): R|test/ClassParamReferencesParam| + 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 e0adec23028..9394336c27f 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 constructor(): R|test/ClassParamReferencesParam| + 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 d520dbcdf22..1947742ac9e 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamReferencesSelf.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassParamReferencesSelf.txt @@ -1,5 +1,5 @@ public final class ClassParamReferencesSelf|> : R|kotlin/Any| { - public constructor(): R|test/ClassParamReferencesSelf| + 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 58cbc2caa15..a89712b71ae 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 constructor(): R|test/Clock| + 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 a39f18227a0..2c36b4e2e08 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 constructor(): R|test/Clock| + 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 daf74472fed..7ff3e35a27e 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 constructor(): R|test/Clock| + public constructor(): R|test/Clock| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassTwoParams.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassTwoParams.txt index 6de8e251b39..4460dbc7a73 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassTwoParams.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassTwoParams.txt @@ -1,4 +1,4 @@ public final class ClassTwoParams : R|kotlin/Any| { - public constructor(): R|test/ClassTwoParams| + public constructor(): R|test/ClassTwoParams| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassTwoParams2.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/class/ClassTwoParams2.txt index 908a306eca1..1de5446e1b4 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 constructor(): R|test/ClassTwoParams| + public constructor(): R|test/ClassTwoParams| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/class/InheritClassWithParam.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/class/InheritClassWithParam.txt index 15c0ba9a86e..7e8b9d32edc 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/class/InheritClassWithParam.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/class/InheritClassWithParam.txt @@ -1,5 +1,5 @@ public abstract class Aaa

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

| + public constructor

(): R|test/Aaa

| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/class/InnerGenericClass.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/class/InnerGenericClass.txt index 188d0f2df21..e23e67bcd77 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/class/InnerGenericClass.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/class/InnerGenericClass.txt @@ -2,7 +2,7 @@ public final class Outer : R|kotlin/Any| { public constructor(): R|test/Outer| public final inner class Inner : R|kotlin/Any| { - public constructor(): R|test/Outer.Inner| + public constructor(): R|test/Outer.Inner| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/class/InnerTypes.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/class/InnerTypes.txt index 7bba9235e28..176caf4530a 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/class/InnerTypes.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/class/InnerTypes.txt @@ -1,15 +1,15 @@ public final class Outer : R|kotlin/Any| { public final fun bar(x: R|test/Outer.Inner2|, y: R|test/Outer.Inner2|): R|kotlin/Unit| - public constructor(): R|test/Outer| + public constructor(): R|test/Outer| public final inner class Inner : R|kotlin/Any| { - public constructor(): R|test/Outer.Inner| + public constructor(): R|test/Outer.Inner| public final inner class Inner3 : R|kotlin/Any| { public final fun foo(x: R|test/Outer.Inner|, y: R|test/Outer.Inner|, z: R|test/Outer.Inner.Inner3|, w: R|test/Outer.Inner.Inner3<*, G, H, E, F>|): R|kotlin/Unit| - public constructor(): R|test/Outer.Inner.Inner3| + public constructor(): R|test/Outer.Inner.Inner3| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/class/NestedGenericClass.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/class/NestedGenericClass.txt index e5ac66e8d62..544843cfd24 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/class/NestedGenericClass.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/class/NestedGenericClass.txt @@ -2,7 +2,7 @@ public final class Outer : R|kotlin/Any| { public constructor(): R|test/Outer| public final class Nested : R|kotlin/Any| { - public constructor(): R|test/Outer.Nested| + public constructor(): R|test/Outer.Nested| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/class/javaBean/JavaBeanVarOfGenericType.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/class/javaBean/JavaBeanVarOfGenericType.txt index def8994723a..efed0eab0b8 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/class/javaBean/JavaBeanVarOfGenericType.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/class/javaBean/JavaBeanVarOfGenericType.txt @@ -3,6 +3,6 @@ public open class JavaBeanVarOfGenericType

: R|kotlin/Any| { public open fun setCharacters(p0: R|java/util/ArrayList

|?): R|kotlin/Unit| - public constructor(): R|test/JavaBeanVarOfGenericType

| + public constructor

(): R|test/JavaBeanVarOfGenericType

| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/classFun/ClassInParamUsedInFun.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/classFun/ClassInParamUsedInFun.txt index 2a7f5eee6af..257ff4de95e 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/classFun/ClassInParamUsedInFun.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/classFun/ClassInParamUsedInFun.txt @@ -1,6 +1,6 @@ public final class ClassParamUsedInFun : R|kotlin/Any| { public final fun f(t: R|T|): R|kotlin/Int| - public constructor(): R|test/ClassParamUsedInFun| + public constructor(): R|test/ClassParamUsedInFun| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/classFun/ClassParamUsedInFun.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/classFun/ClassParamUsedInFun.txt index 558385893b6..5b023f67df5 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/classFun/ClassParamUsedInFun.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/classFun/ClassParamUsedInFun.txt @@ -1,6 +1,6 @@ public final class ClassParamUsedInFun : R|kotlin/Any| { public final fun f(t: R|T|): R|kotlin/Int| - public constructor(): R|test/ClassParamUsedInFun| + public constructor(): R|test/ClassParamUsedInFun| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/classFun/FunInParamSuper.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/classFun/FunInParamSuper.txt index dc65c392e18..f4f9a3cf6f8 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/classFun/FunInParamSuper.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/classFun/FunInParamSuper.txt @@ -1,7 +1,7 @@ public open class Base : R|kotlin/Any| { public final fun foo(): R|T| - public constructor(): R|test/Base| + public constructor(): R|test/Base| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/constructor/ConstructorWithTwoTypeParameters.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/constructor/ConstructorWithTwoTypeParameters.txt index 701dc239d3a..e8a74d41755 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/constructor/ConstructorWithTwoTypeParameters.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/constructor/ConstructorWithTwoTypeParameters.txt @@ -1,4 +1,4 @@ public final class ClassWithConstructorAndTypeParameter : R|kotlin/Any| { - public constructor(): R|test/ClassWithConstructorAndTypeParameter| + public constructor(): R|test/ClassWithConstructorAndTypeParameter| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOneIntValueParameter.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOneIntValueParameter.txt index 858f1d01649..0c892b50c62 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOneIntValueParameter.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOneIntValueParameter.txt @@ -1,4 +1,4 @@ public final class ClassWithConstructorAndTypeParameter : R|kotlin/Any| { - public constructor(q: R|kotlin/Int|): R|test/ClassWithConstructorAndTypeParameter| + public constructor(q: R|kotlin/Int|): R|test/ClassWithConstructorAndTypeParameter| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOnePValueParameter.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOnePValueParameter.txt index 02518327201..84cb08a9204 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOnePValueParameter.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/constructor/ConstructorWithTwoTypeParametersAndOnePValueParameter.txt @@ -1,4 +1,4 @@ public final class ClassWithConstructorAndTypeParameter : R|kotlin/Any| { - public constructor(q: R|Q|): R|test/ClassWithConstructorAndTypeParameter| + public constructor(q: R|Q|): R|test/ClassWithConstructorAndTypeParameter| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/constructor/ConstructorWithTypeParameter.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/constructor/ConstructorWithTypeParameter.txt index 24493b8e946..404fb31d2ee 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/constructor/ConstructorWithTypeParameter.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/constructor/ConstructorWithTypeParameter.txt @@ -1,4 +1,4 @@ public final class ClassWithConstructorAndTypeParameter

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

| + public constructor

(): R|test/ClassWithConstructorAndTypeParameter

| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/constructor/ConstructorWithTypeParametersEAndOnePValueParameter.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/constructor/ConstructorWithTypeParametersEAndOnePValueParameter.txt index b86b1a41e64..18263f2fc1c 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/constructor/ConstructorWithTypeParametersEAndOnePValueParameter.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/constructor/ConstructorWithTypeParametersEAndOnePValueParameter.txt @@ -1,4 +1,4 @@ public final class OneTypeParameterErased : R|kotlin/Any| { - public constructor(q: R|Q|): R|test/OneTypeParameterErased| + public constructor(q: R|Q|): R|test/OneTypeParameterErased| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypeP.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypeP.txt index e6761c66586..d62fc3e3904 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypeP.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypeP.txt @@ -1,4 +1,4 @@ public final class ClassWithTypeP

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

| + public constructor

(): R|test/ClassWithTypeP

| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypePExtendsIterableP.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypePExtendsIterableP.txt index 429f038788f..038b13b31f6 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypePExtendsIterableP.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypePExtendsIterableP.txt @@ -1,4 +1,4 @@ public abstract class ClassWithTypePExtendsIterableP

: R|kotlin/collections/MutableIterable

| { - public constructor(): R|test/ClassWithTypePExtendsIterableP

| + public constructor

(): R|test/ClassWithTypePExtendsIterableP

| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypePP.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypePP.txt index b0b26388370..ae67ea3b7ef 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 constructor(): R|test/ClassWithTypePP| + 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 473407f690e..d47f9e5f478 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|?, P> : R|kotlin/Any| { - public constructor(): R|test/ClassWithTypePRefNext| + public constructor|?, P>(): R|test/ClassWithTypePRefNext| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypePRefSelf.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/ClassWithTypePRefSelf.txt index 02d43304059..af1f1138354 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 constructor(): R|test/ClassWithTypePRefSelf

| + 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 7c097c14ba2..4b0d7957240 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 constructor(): R|test/ClassWithTypePRefSelfAndClass

| + public constructor

|?>(): R|test/ClassWithTypePRefSelfAndClass

| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/MethodWithTypePRefClassP.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/MethodWithTypePRefClassP.txt index 199f63d0432..67fedf9ef42 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/MethodWithTypePRefClassP.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/MethodWithTypePRefClassP.txt @@ -1,6 +1,6 @@ public open class MethodWithTypePRefClassP

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

| + public constructor

(): R|test/MethodWithTypePRefClassP

| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithNewTypeParams.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithNewTypeParams.txt index ed78368b0f6..41d566fae42 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithNewTypeParams.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithNewTypeParams.txt @@ -1,4 +1,4 @@ public open class ConstructorWithNewTypeParams : R|kotlin/Any| { - public constructor(first: R|kotlin/Any|): R|test/ConstructorWithNewTypeParams| + public constructor(first: R|kotlin/Any|): R|test/ConstructorWithNewTypeParams| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithParentTypeParams.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithParentTypeParams.txt index 852c8643c2c..34bc934bc0e 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithParentTypeParams.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/ConstructorWithParentTypeParams.txt @@ -1,4 +1,4 @@ public open class ConstructorWithParentTypeParams : R|kotlin/Any| { - public constructor(first: R|T|): R|test/ConstructorWithParentTypeParams| + public constructor(first: R|T|): R|test/ConstructorWithParentTypeParams| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.txt index e32f822dfea..207858a3109 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/PropertyArrayTypes.txt @@ -1,4 +1,4 @@ public open class PropertyArrayTypes : R|kotlin/Any| { - public constructor(): R|test/PropertyArrayTypes| + public constructor(): R|test/PropertyArrayTypes| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/PropertyComplexTypes.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/PropertyComplexTypes.txt index f3eeebdde70..c2d346e8b32 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/PropertyComplexTypes.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/fromLoadJava/kotlinSignature/PropertyComplexTypes.txt @@ -1,4 +1,4 @@ public open class PropertyComplexTypes : R|kotlin/Any| { - public constructor(): R|test/PropertyComplexTypes| + public constructor(): R|test/PropertyComplexTypes| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/nested/DeepInnerGeneric.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/nested/DeepInnerGeneric.txt index 1ef97bd5fe8..c9f296a6e18 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/nested/DeepInnerGeneric.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/nested/DeepInnerGeneric.txt @@ -1,18 +1,18 @@ public final class A : R|kotlin/Any| { - public constructor(): R|test/A| + public constructor(): R|test/A| public final inner class B : R|kotlin/Any| { - public constructor(): R|test/A.B| + public constructor(): R|test/A.B| public final inner class C : R|kotlin/Any| { - public constructor(): R|test/A.B.C| + public constructor(): R|test/A.B.C| public final inner class D : R|kotlin/Any| { public final fun bar(ta: R|TA|, tb: R|TB|, tc: R|TC|, td: R|TD|): R|test/A.B.C.D| public final fun foo(p1: R|P1|, p2: R|P2|, p3: R|P3|, p4: R|P4|): R|kotlin/Nothing| - public constructor(): R|test/A.B.C.D| + public constructor(): R|test/A.B.C.D| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/nested/InnerClassReferencesOuterTP.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/nested/InnerClassReferencesOuterTP.txt index 7b25795544b..6f36127b838 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/nested/InnerClassReferencesOuterTP.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/nested/InnerClassReferencesOuterTP.txt @@ -1,8 +1,8 @@ public final class InnerClassReferencesOuterTP

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

| + public constructor

(): R|test/InnerClassReferencesOuterTP

| public final inner class Inner : R|kotlin/Any| { - public constructor(): R|test/InnerClassReferencesOuterTP.Inner| + 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 364310a40a3..f6bff0421ef 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/nested/MembersReferenceOuterTP.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/nested/MembersReferenceOuterTP.txt @@ -1,5 +1,5 @@ public final class MembersReferenceOuterTP

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

| + public constructor

(): R|test/MembersReferenceOuterTP

| public final inner class Inner : R|kotlin/Any| { public final fun f(): R|kotlin/Unit| diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtValIntTInClass.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtValIntTInClass.txt index a1263cca6d9..3794ed901fe 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtValIntTInClass.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtValIntTInClass.txt @@ -1,4 +1,4 @@ public final class ExtValInClass : R|kotlin/Any| { - public constructor(): R|test/ExtValInClass| + public constructor(): R|test/ExtValInClass| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtValIntTQInClass.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtValIntTQInClass.txt index 180614aa28b..3b6faea5b29 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtValIntTQInClass.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtValIntTQInClass.txt @@ -1,4 +1,4 @@ public final class ExtValInClass

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

| + public constructor

(): R|test/ExtValInClass

| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtValTIntInClass.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtValTIntInClass.txt index 227e12c58d6..df55b39c5e5 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtValTIntInClass.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtValTIntInClass.txt @@ -1,4 +1,4 @@ public final class ExtValPIntInClass

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

| + public constructor

(): R|test/ExtValPIntInClass

| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtVarIntTInClass.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtVarIntTInClass.txt index 180614aa28b..3b6faea5b29 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtVarIntTInClass.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtVarIntTInClass.txt @@ -1,4 +1,4 @@ public final class ExtValInClass

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

| + public constructor

(): R|test/ExtValInClass

| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtVarIntTQInClass.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtVarIntTQInClass.txt index 180614aa28b..3b6faea5b29 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtVarIntTQInClass.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtVarIntTQInClass.txt @@ -1,4 +1,4 @@ public final class ExtValInClass

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

| + public constructor

(): R|test/ExtValInClass

| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtVarTIntInClass.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtVarTIntInClass.txt index 227e12c58d6..df55b39c5e5 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtVarTIntInClass.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtVarTIntInClass.txt @@ -1,4 +1,4 @@ public final class ExtValPIntInClass

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

| + public constructor

(): R|test/ExtValPIntInClass

| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtVarTQIntInClass.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtVarTQIntInClass.txt index 227e12c58d6..df55b39c5e5 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtVarTQIntInClass.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/prop/ExtVarTQIntInClass.txt @@ -1,4 +1,4 @@ public final class ExtValPIntInClass

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

| + public constructor

(): R|test/ExtValPIntInClass

| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/prop/VarWithDelegated.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/prop/VarWithDelegated.txt index eebd5725c1d..ece2a1ea362 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/prop/VarWithDelegated.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/prop/VarWithDelegated.txt @@ -8,6 +8,6 @@ public final class MyProperty : R|kotlin/Any| { public final operator fun setValue(t: R|T|, p: R|kotlin/reflect/KProperty<*>|, i: R|kotlin/Int|): R|kotlin/Unit| - public constructor(): R|test/MyProperty| + public constructor(): R|test/MyProperty| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/typealias/TypeAliasToExtension.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/typealias/TypeAliasToExtension.txt index a63faa7e950..c39a9b2429c 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/typealias/TypeAliasToExtension.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/typealias/TypeAliasToExtension.txt @@ -1,6 +1,6 @@ public final fun

foo(x: R|kotlin/Function1, kotlin/Unit>|): R|kotlin/Unit| public final class Foo : R|kotlin/Any| { - public constructor(): R|test/Foo| + public constructor(): R|test/Foo| } diff --git a/compiler/fir/resolve/testData/loadCompiledKotlin/visibility/PrivateToThis.txt b/compiler/fir/resolve/testData/loadCompiledKotlin/visibility/PrivateToThis.txt index 3a4158db385..fee75f8e17d 100644 --- a/compiler/fir/resolve/testData/loadCompiledKotlin/visibility/PrivateToThis.txt +++ b/compiler/fir/resolve/testData/loadCompiledKotlin/visibility/PrivateToThis.txt @@ -1,6 +1,6 @@ public final class A : R|kotlin/Any| { private/*private to this*/ final fun bas(): R|I| - public constructor(): R|test/A| + public constructor(): R|test/A| }