From 3c4ce65b542e060cc68d77e8f8918ff6395f9f0a Mon Sep 17 00:00:00 2001 From: Maxim Grankin Date: Sat, 19 Nov 2022 21:36:44 +0400 Subject: [PATCH] Self types: Add Self type for class annotated with @Self into all constructors of this class. This allows to create Self classes. Example: ``` @Self class Foo { // generated type: out Self: Foo ... } Foo() // last type argument would be generated as Foo> ``` --- .../testData/resolve/cfg/selfTypes.fir.txt | 29 +++++---- .../testData/resolve/cfg/selfTypes.kt | 7 +- .../fir/backend/Fir2IrClassifierStorage.kt | 6 +- .../fir/backend/Fir2IrDeclarationStorage.kt | 10 ++- .../FirBlackBoxCodegenTestGenerated.java | 6 ++ .../fir/resolve/calls/TypeArgumentMapping.kt | 64 ++++++++++++++++++- .../fir/resolve/inference/FirCallCompleter.kt | 3 +- .../transformers/FirSupertypesResolution.kt | 9 +++ .../body/resolve/BodyResolveContext.kt | 5 +- .../resolve/inference/ConeTypeVariables.kt | 10 ++- .../codegen/box/fir/selfTypeBuilderTest.kt | 52 +++++++++++++++ .../testData/codegen/box/fir/selfTypes.kt | 5 +- .../IrBlackBoxCodegenTestGenerated.java | 6 ++ 13 files changed, 186 insertions(+), 26 deletions(-) create mode 100644 compiler/testData/codegen/box/fir/selfTypeBuilderTest.kt diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/selfTypes.fir.txt b/compiler/fir/analysis-tests/testData/resolve/cfg/selfTypes.fir.txt index cab44d760c668..25e1dfbda0597 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/selfTypes.fir.txt +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/selfTypes.fir.txt @@ -1,6 +1,6 @@ FILE: selfTypes.kt @R|kotlin/Self|() public final class JustSelfAnnotation : R|JustSelfAnnotation<>|> : R|kotlin/Any| { - public constructor(): R|JustSelfAnnotation| { + public constructor : R|JustSelfAnnotation<>|>(): R|JustSelfAnnotation<>| { super() } @@ -10,7 +10,7 @@ FILE: selfTypes.kt } @R|kotlin/Self|() public final class ReturnType : R|ReturnType<>|> : R|kotlin/Any| { - public constructor(): R|ReturnType| { + public constructor : R|ReturnType<>|>(): R|ReturnType<>| { super() } @@ -21,7 +21,7 @@ FILE: selfTypes.kt } @R|kotlin/Self|() public final class ReturnTypeWithTypeParameter : R|ReturnTypeWithTypeParameter>|> : R|kotlin/Any| { - public constructor(): R|ReturnTypeWithTypeParameter| { + public constructor : R|ReturnTypeWithTypeParameter>|>(): R|ReturnTypeWithTypeParameter>| { super() } @@ -29,9 +29,14 @@ FILE: selfTypes.kt ^returnType (this@R|/ReturnTypeWithTypeParameter| as R||) } + public final fun functionWithConstruct(): R|| { + lval s: R|ReturnTypeWithTypeParameter>| = R|/ReturnTypeWithTypeParameter.ReturnTypeWithTypeParameter||>() + ^functionWithConstruct (this@R|/ReturnTypeWithTypeParameter| as R||) + } + } @R|kotlin/Self|() public final class ReturnTypeWithTypeParameters : R|ReturnTypeWithTypeParameters>|> : R|kotlin/Any| { - public constructor(): R|ReturnTypeWithTypeParameters| { + public constructor : R|ReturnTypeWithTypeParameters>|>(): R|ReturnTypeWithTypeParameters>| { super() } @@ -46,7 +51,7 @@ FILE: selfTypes.kt } @R|kotlin/Self|() public final inner class Inner : R|InnerClass.Inner<>|> : R|kotlin/Any| { - public InnerClass.constructor(): R|InnerClass.Inner| { + public InnerClass.constructor : R|InnerClass.Inner<>|>(): R|InnerClass.Inner<>| { super() } @@ -63,7 +68,7 @@ FILE: selfTypes.kt } @R|kotlin/Self|() public final class Nested : R|NestedClass.Nested<>|> : R|kotlin/Any| { - public constructor(): R|NestedClass.Nested| { + public constructor : R|NestedClass.Nested<>|>(): R|NestedClass.Nested<>| { super() } @@ -75,7 +80,7 @@ FILE: selfTypes.kt } @R|kotlin/Self|() public final class InnerSelfClass : R|InnerSelfClass<>|> : R|kotlin/Any| { - public constructor(): R|InnerSelfClass| { + public constructor : R|InnerSelfClass<>|>(): R|InnerSelfClass<>| { super() } @@ -95,12 +100,12 @@ FILE: selfTypes.kt } public final fun returnSelfClassType(): R|InnerSelfClass.Self| { - ^returnSelfClassType R|/InnerSelfClass.InnerSelfClass|().R|/InnerSelfClass.Self.Self|() + ^returnSelfClassType R|/InnerSelfClass.InnerSelfClass||>().R|/InnerSelfClass.Self.Self|() } } @R|kotlin/Self|() public final class TypeAliasSelf : R|TypeAliasSelf<>|> : R|kotlin/Any| { - public constructor(): R|TypeAliasSelf| { + public constructor : R|TypeAliasSelf<>|>(): R|TypeAliasSelf<>| { super() } @@ -116,7 +121,7 @@ FILE: selfTypes.kt } @R|kotlin/Self|() public final class SelfWithSelfVariable : R|SelfWithSelfVariable<>|> : R|kotlin/Any| { - public constructor(): R|SelfWithSelfVariable| { + public constructor : R|SelfWithSelfVariable<>|>(): R|SelfWithSelfVariable<>| { super() } @@ -132,7 +137,7 @@ FILE: selfTypes.kt } @R|kotlin/Self|() public final inner class SelfAnnotated|, out : R|InnerClassWithSelfAnnotation.SelfAnnotated>|> : R|kotlin/Any| { - public InnerClassWithSelfAnnotation.constructor(): R|InnerClassWithSelfAnnotation.SelfAnnotated| { + public InnerClassWithSelfAnnotation.constructor : R|InnerClassWithSelfAnnotation.SelfAnnotated>|>(): R|InnerClassWithSelfAnnotation.SelfAnnotated>| { super() } @@ -150,7 +155,7 @@ FILE: selfTypes.kt @R|kotlin/Self|() public abstract interface SelfTypeParameterInterface : R|SelfTypeParameterInterface<>|> : R|kotlin/Any| { } @R|kotlin/Self|() public final class SelfTypeAsTypeParameterInExtends : R|SelfTypeAsTypeParameterInExtends<>|> : R|SelfTypeParameterInterface<>| { - public constructor(): R|SelfTypeAsTypeParameterInExtends| { + public constructor : R|SelfTypeAsTypeParameterInExtends<>|>(): R|SelfTypeAsTypeParameterInExtends<>| { super() } diff --git a/compiler/fir/analysis-tests/testData/resolve/cfg/selfTypes.kt b/compiler/fir/analysis-tests/testData/resolve/cfg/selfTypes.kt index 6e163b41c60f3..21d67c25f951b 100644 --- a/compiler/fir/analysis-tests/testData/resolve/cfg/selfTypes.kt +++ b/compiler/fir/analysis-tests/testData/resolve/cfg/selfTypes.kt @@ -18,6 +18,11 @@ class ReturnTypeWithTypeParameter { fun returnType(): Self { return this as Self } + + fun functionWithConstruct(): Self { + val s = ReturnTypeWithTypeParameter>() + return this as Self + } } @Self @@ -58,7 +63,7 @@ class InnerSelfClass { } fun returnSelfClassType(): InnerSelfClass.Self { - return InnerSelfClass().Self() + return InnerSelfClass>().Self() } } diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrClassifierStorage.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrClassifierStorage.kt index 33604f004227a..5e0bb2950f4f3 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrClassifierStorage.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrClassifierStorage.kt @@ -113,7 +113,7 @@ class Fir2IrClassifierStorage( typeContext: ConversionTypeContext = ConversionTypeContext.DEFAULT ) { typeParameters = owner.typeParameters.mapIndexedNotNull { index, typeParameter -> - if (typeParameter !is FirTypeParameter) return@mapIndexedNotNull null + if (typeParameter !is FirTypeParameter || (typeParameter.name == SELF_TYPE && owner is FirConstructor)) return@mapIndexedNotNull null getIrTypeParameter(typeParameter, index, symbol, typeContext).apply { parent = this@setTypeParameters if (superTypes.isEmpty()) { @@ -401,7 +401,7 @@ class Fir2IrClassifierStorage( ) { symbol -> irFactory.createTypeParameter( startOffset, endOffset, origin, symbol, - name, if (index < 0) 0 else index, + replacedSelfName, if (index < 0) 0 else index, isReified, variance ) @@ -413,7 +413,7 @@ class Fir2IrClassifierStorage( ) { symbol -> irFactory.createTypeParameter( startOffset, endOffset, origin, symbol, - name, if (index < 0) 0 else index, + replacedSelfName, if (index < 0) 0 else index, isReified, variance ) diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt index 384bbfb081adb..5c24a19d94083 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/Fir2IrDeclarationStorage.kt @@ -1440,8 +1440,14 @@ class Fir2IrDeclarationStorage( firPropertySymbol.dispatchReceiverClassLookupTagOrNull() != firPropertySymbol.originalForSubstitutionOverride?.dispatchReceiverClassLookupTagOrNull() Fir2IrLazyProperty( - components, startOffset, endOffset, declarationOrigin, - fir, (lazyParent as? Fir2IrLazyClass)?.fir, symbol, isFakeOverride + components, + startOffset, + endOffset, + declarationOrigin, + fir, + (lazyParent as? Fir2IrLazyClass)?.fir, + symbol, + isFakeOverride ).apply { this.parent = lazyParent } diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java index 7ccde9dd37867..716dfd1a5f80f 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java @@ -18373,6 +18373,12 @@ public void testSamWithReceiverMavenProjectImportHandler() throws Exception { runTest("compiler/testData/codegen/box/fir/SamWithReceiverMavenProjectImportHandler.kt"); } + @Test + @TestMetadata("selfTypeBuilderTest.kt") + public void testSelfTypeBuilderTest() throws Exception { + runTest("compiler/testData/codegen/box/fir/selfTypeBuilderTest.kt"); + } + @Test @TestMetadata("selfTypes.kt") public void testSelfTypes() throws Exception { diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/TypeArgumentMapping.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/TypeArgumentMapping.kt index e3771c3a787f3..69a62e3c74600 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/TypeArgumentMapping.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/calls/TypeArgumentMapping.kt @@ -9,10 +9,19 @@ import org.jetbrains.kotlin.fir.declarations.FirCallableDeclaration import org.jetbrains.kotlin.fir.declarations.FirDeclaration import org.jetbrains.kotlin.fir.declarations.FirDeclarationOrigin import org.jetbrains.kotlin.fir.declarations.FirTypeParameterRefsOwner +import org.jetbrains.kotlin.fir.declarations.hasAnnotation +import org.jetbrains.kotlin.fir.resolve.providers.symbolProvider +import org.jetbrains.kotlin.fir.symbols.impl.FirClassSymbol +import org.jetbrains.kotlin.fir.symbols.impl.FirConstructorSymbol +import org.jetbrains.kotlin.fir.types.* import org.jetbrains.kotlin.fir.types.ConeTypeIntersector import org.jetbrains.kotlin.fir.types.FirTypeProjection import org.jetbrains.kotlin.fir.types.builder.buildPlaceholderProjection import org.jetbrains.kotlin.fir.types.builder.buildTypeProjectionWithVariance +import org.jetbrains.kotlin.fir.types.impl.ConeClassLikeTypeImpl +import org.jetbrains.kotlin.name.StandardClassIds +import org.jetbrains.kotlin.types.Variance +import org.jetbrains.kotlin.fir.types.builder.buildTypeProjectionWithVariance import org.jetbrains.kotlin.fir.types.isRaw import org.jetbrains.kotlin.fir.types.toFirResolvedTypeRef import org.jetbrains.kotlin.types.Variance @@ -33,7 +42,7 @@ sealed class TypeArgumentMapping { internal object MapTypeArguments : ResolutionStage() { override suspend fun check(candidate: Candidate, callInfo: CallInfo, sink: CheckerSink, context: ResolutionContext) { - val typeArguments = callInfo.typeArguments + val typeArguments = enrichedTypeArgumentsWithSelfType(candidate, callInfo, context, callInfo.typeArguments) val owner = candidate.symbol.fir as FirTypeParameterRefsOwner if (typeArguments.isEmpty()) { @@ -60,6 +69,59 @@ internal object MapTypeArguments : ResolutionStage() { } } + private fun enrichedTypeArgumentsWithSelfType( + candidate: Candidate, + callInfo: CallInfo, + context: ResolutionContext, + typeArguments: List + ): List { + if (candidate.symbol is FirConstructorSymbol) { + + val firConstructorSymbol = candidate.symbol + + if (firConstructorSymbol.callableId.classId != null) { + + val classLikeSymbol = context.session.symbolProvider.getClassLikeSymbolByClassId(firConstructorSymbol.callableId.classId!!) + + if (classLikeSymbol != null) { + val firClassSymbol = classLikeSymbol as FirClassSymbol + + val isSelf = firClassSymbol.hasAnnotation(StandardClassIds.Annotations.Self) + + if (isSelf && callInfo.callKind is CallKind.Function) { + val constructorTypeParametersSize = firConstructorSymbol.typeParameterSymbols.size + val callTypeArgumentsSize = typeArguments.size + + if (constructorTypeParametersSize != callTypeArgumentsSize) { + val coneArgumentsWithStar = + (typeArguments.map { it.toConeTypeProjection() }.toList() + ConeStarProjection).toTypedArray() + val typeRef = firConstructorSymbol.fir.returnTypeRef + val oldConeType = typeRef.coneType as ConeClassLikeType + val coneTypeWithStar = + ConeClassLikeTypeImpl( + oldConeType.lookupTag, + coneArgumentsWithStar, + oldConeType.isNullable, + oldConeType.attributes + ) + + val typeRefWithStar = typeRef.withReplacedConeType(coneTypeWithStar) + val baseClassStarProjection = buildTypeProjectionWithVariance { + source = typeRefWithStar.source + this.typeRef = typeRefWithStar + variance = Variance.INVARIANT + } + + return typeArguments + baseClassStarProjection + } + } + } + + } + } + return typeArguments + } + private fun computeDefaultMappingForRawTypeMember( owner: FirTypeParameterRefsOwner, context: ResolutionContext diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/FirCallCompleter.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/FirCallCompleter.kt index de7218e40ca9f..46743416ca7d7 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/FirCallCompleter.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/inference/FirCallCompleter.kt @@ -67,7 +67,7 @@ class FirCallCompleter( mayBeCoercionToUnitApplied = false, expectedTypeMismatchIsReportedInChecker, isFromCast = false, - shouldEnforceExpectedType = true, + shouldEnforceExpectedType = true ) fun completeCall(call: T, data: ResolutionMode): CompletionResult where T : FirResolvable, T : FirStatement = @@ -95,7 +95,6 @@ class FirCallCompleter( } val reference = call.calleeReference as? FirNamedReferenceWithCandidate ?: return CompletionResult(call, true) - val candidate = reference.candidate val initialType = components.initialTypeOfCandidate(candidate, call) diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirSupertypesResolution.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirSupertypesResolution.kt index 59492f55be521..8804d2c147d8c 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirSupertypesResolution.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/FirSupertypesResolution.kt @@ -489,6 +489,15 @@ open class FirSupertypeResolverVisitor( }.build() firClass.replaceTypeParameters(params + selfTypeParameter) + + if (firClass is FirClass) { + firClass.declarations.filterIsInstance().forEach { + val constructorTypeParams = it.typeParameters + it.replaceTypeParameters(constructorTypeParams + selfTypeParameter) + val firClassTypeRef = it.returnTypeRef.resolvedTypeFromPrototype(firClass.defaultType()) + it.replaceReturnTypeRef(firClassTypeRef) + } + } } } diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/BodyResolveContext.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/BodyResolveContext.kt index 12256e534a508..407aa95e4ccb9 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/BodyResolveContext.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/transformers/body/resolve/BodyResolveContext.kt @@ -15,7 +15,6 @@ import org.jetbrains.kotlin.fir.declarations.utils.isCompanion import org.jetbrains.kotlin.fir.declarations.utils.isInner import org.jetbrains.kotlin.fir.expressions.FirCallableReferenceAccess import org.jetbrains.kotlin.fir.expressions.FirWhenExpression -import org.jetbrains.kotlin.fir.expressions.classId import org.jetbrains.kotlin.fir.resolve.* import org.jetbrains.kotlin.fir.resolve.calls.ImplicitExtensionReceiverValue import org.jetbrains.kotlin.fir.resolve.calls.ImplicitReceiverValue @@ -458,7 +457,9 @@ class BodyResolveContext( .addNonLocalScopeIfNotNull(selfTypeScope) val scopeForConstructorHeader = - staticsAndCompanion.addNonLocalScopeIfNotNull(typeParameterScope) + staticsAndCompanion + .addNonLocalScopeIfNotNull(typeParameterScope) + .addNonLocalScopeIfNotNull(selfTypeScope) /* * Scope for enum entries is equal to initial scope for constructor header diff --git a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/inference/ConeTypeVariables.kt b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/inference/ConeTypeVariables.kt index 80cf58f27df6d..5f373d6656656 100644 --- a/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/inference/ConeTypeVariables.kt +++ b/compiler/fir/semantics/src/org/jetbrains/kotlin/fir/resolve/inference/ConeTypeVariables.kt @@ -8,6 +8,7 @@ package org.jetbrains.kotlin.fir.resolve.inference import org.jetbrains.kotlin.fir.declarations.FirAnonymousFunction import org.jetbrains.kotlin.fir.symbols.impl.FirTypeParameterSymbol import org.jetbrains.kotlin.fir.types.ConeTypeVariable +import org.jetbrains.kotlin.name.SpecialNames class ConeTypeVariableForPostponedAtom(name: String) : ConeTypeVariable(name) class ConeTypeVariableForLambdaParameterType(name: String, val index: Int) : ConeTypeVariable(name) @@ -15,4 +16,11 @@ class ConeTypeVariableForLambdaReturnType(val argument: FirAnonymousFunction, na class ConeTypeParameterBasedTypeVariable( val typeParameterSymbol: FirTypeParameterSymbol -) : ConeTypeVariable(typeParameterSymbol.name.identifier, typeParameterSymbol.toLookupTag()) +) : ConeTypeVariable( + if (typeParameterSymbol.name == SpecialNames.SELF_TYPE) SELF_IDENTIFIER else typeParameterSymbol.name.identifier, + typeParameterSymbol.toLookupTag() +) { + companion object { + const val SELF_IDENTIFIER = "\$Self" + } +} diff --git a/compiler/testData/codegen/box/fir/selfTypeBuilderTest.kt b/compiler/testData/codegen/box/fir/selfTypeBuilderTest.kt new file mode 100644 index 0000000000000..7910dec1cc6d2 --- /dev/null +++ b/compiler/testData/codegen/box/fir/selfTypeBuilderTest.kt @@ -0,0 +1,52 @@ +// TARGET_BACKEND: JVM_IR +// IGNORE_BACKEND: JVM_IR + +// WITH_STDLIB + +import kotlin.Self + +open class Person(builder: PersonBuilder<*>) { + var name: String + + init { + this.name = builder.name + } +} + +class Employee(builder: EmployeeBuilder) : Person(builder) { + var role: String + + init { + this.role = builder.role + } +} + +@Self +open class PersonBuilder { + lateinit var name: String + + fun setName(name: String): Self { + this.name = name + return this as Self + } + + open fun build(): Person = Person(this) +} + +class EmployeeBuilder : PersonBuilder() { + lateinit var role: String + + fun setRole(role: String): EmployeeBuilder { + this.role = role + return this + } + + override fun build(): Employee = Employee(this) +} + +fun box(): String { + val person: Person = PersonBuilder().setName("Person").build() + val employee: Employee = EmployeeBuilder().setName("Employee").setRole("Role").build() + val predicate = (person.name == "Person" && employee.name == "Employee" && employee.role == "Role") + return if (predicate) "OK" else "ERROR" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/fir/selfTypes.kt b/compiler/testData/codegen/box/fir/selfTypes.kt index da402dadac972..f6c8a274d13ca 100644 --- a/compiler/testData/codegen/box/fir/selfTypes.kt +++ b/compiler/testData/codegen/box/fir/selfTypes.kt @@ -6,7 +6,7 @@ import kotlin.Self @Self -class Foo { +open class Foo { public val bar = 1 fun test(): Self = this as Self @@ -21,5 +21,6 @@ class Foo { } fun box(): String { - return Foo().box() + val foo = Foo() + return foo.box() } \ No newline at end of file diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index 3cb6fd39f8e25..f01dea9da06f5 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -18373,6 +18373,12 @@ public void testSamWithReceiverMavenProjectImportHandler() throws Exception { runTest("compiler/testData/codegen/box/fir/SamWithReceiverMavenProjectImportHandler.kt"); } + @Test + @TestMetadata("selfTypeBuilderTest.kt") + public void testSelfTypeBuilderTest() throws Exception { + runTest("compiler/testData/codegen/box/fir/selfTypeBuilderTest.kt"); + } + @Test @TestMetadata("selfTypes.kt") public void testSelfTypes() throws Exception {