diff --git a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/impl/FirTypeResolverImpl.kt b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/impl/FirTypeResolverImpl.kt index bfc154c6053..0f7c4528bc5 100644 --- a/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/impl/FirTypeResolverImpl.kt +++ b/compiler/fir/resolve/src/org/jetbrains/kotlin/fir/resolve/impl/FirTypeResolverImpl.kt @@ -88,7 +88,8 @@ class FirTypeResolverImpl(private val session: FirSession) : FirTypeResolver { private fun createFunctionalType(typeRef: FirFunctionTypeRef): ConeClassType { val parameters = listOfNotNull((typeRef.receiverTypeRef as FirResolvedTypeRef?)?.type) + - typeRef.valueParameters.map { it.returnTypeRef.coneTypeUnsafe() } + typeRef.valueParameters.map { it.returnTypeRef.coneTypeUnsafe() } + + listOf(typeRef.returnTypeRef.coneTypeUnsafe()) return ConeClassTypeImpl( resolveBuiltInQualified(KotlinBuiltIns.getFunctionClassId(typeRef.parametersCount), session).toLookupTag(), parameters.toTypedArray(), diff --git a/compiler/fir/resolve/testData/resolve/arguments/lambda.txt b/compiler/fir/resolve/testData/resolve/arguments/lambda.txt index 11c847f0520..3e9f03d753e 100644 --- a/compiler/fir/resolve/testData/resolve/arguments/lambda.txt +++ b/compiler/fir/resolve/testData/resolve/arguments/lambda.txt @@ -1,9 +1,9 @@ FILE: lambda.kt - public final fun foo(f: R|kotlin/Function0|): R|kotlin/Unit| { + public final fun foo(f: R|kotlin/Function0|): R|kotlin/Unit| { } - public final fun bar(x: R|kotlin/Int|, f: R|kotlin/Function0|): R|kotlin/Unit| { + public final fun bar(x: R|kotlin/Int|, f: R|kotlin/Function0|): R|kotlin/Unit| { } - public final fun baz(f: R|kotlin/Function0|, other: R|kotlin/Boolean| = Boolean(true)): R|kotlin/Unit| { + public final fun baz(f: R|kotlin/Function0|, other: R|kotlin/Boolean| = Boolean(true)): R|kotlin/Unit| { } public final fun test(): R|kotlin/Unit| { R|/foo|( = foo@fun .(): { diff --git a/compiler/fir/resolve/testData/resolve/ft.txt b/compiler/fir/resolve/testData/resolve/ft.txt index b8069a6bdda..a96bea8efb5 100644 --- a/compiler/fir/resolve/testData/resolve/ft.txt +++ b/compiler/fir/resolve/testData/resolve/ft.txt @@ -1,5 +1,5 @@ FILE: ft.kt public abstract interface KMutableProperty1 : R|KProperty1| { } - public abstract interface KProperty1 : R|kotlin/Function1| { + public abstract interface KProperty1 : R|kotlin/Function1| { } diff --git a/compiler/fir/resolve/testData/resolve/functionTypes.txt b/compiler/fir/resolve/testData/resolve/functionTypes.txt index f927b47d810..43e3ea86178 100644 --- a/compiler/fir/resolve/testData/resolve/functionTypes.txt +++ b/compiler/fir/resolve/testData/resolve/functionTypes.txt @@ -1,15 +1,15 @@ FILE: functionTypes.kt - public final fun simpleRun(f: R|kotlin/Function1|): R|kotlin/Unit| { + public final fun simpleRun(f: R|kotlin/Function1|): R|kotlin/Unit| { ^simpleRun #() } - public final fun R|kotlin/collections/List|.simpleMap(f: R|kotlin/Function1|): R|R| { + public final fun R|kotlin/collections/List|.simpleMap(f: R|kotlin/Function1|): R|R| { } - public final fun simpleWith(t: R|T|, f: R|kotlin/Function1|): R|kotlin/Unit| { + public final fun simpleWith(t: R|T|, f: R|kotlin/Function1|): R|kotlin/Unit| { ^simpleWith R|/t|.#() } public abstract interface KMutableProperty1 : R|KProperty1|, R|KMutableProperty| { } - public abstract interface KProperty1 : R|KProperty|, R|kotlin/Function1| { + public abstract interface KProperty1 : R|KProperty|, R|kotlin/Function1| { } public abstract interface KProperty : R|kotlin/Any| { }