FIR: make (K)SuspendFunctionX derived from (K)Function

This commit is contained in:
Jinseong Jeon
2020-05-05 22:15:09 -07:00
committed by Mikhail Glukhikh
parent 9eee089740
commit 0c7ed04260
5 changed files with 8 additions and 5 deletions
@@ -235,7 +235,10 @@ class FirBuiltinSymbolProvider(val session: FirSession, val kotlinScopeProvider:
)
FunctionClassDescriptor.Kind.SuspendFunction -> listOf(
session.builtinTypes.anyType
buildResolvedTypeRef {
type = ConeClassLikeLookupTagImpl(StandardClassIds.Function)
.constructClassType(arrayOf(typeArguments.last().type), isNullable = false)
}
)
FunctionClassDescriptor.Kind.KFunction -> listOf(
@@ -247,6 +250,10 @@ class FirBuiltinSymbolProvider(val session: FirSession, val kotlinScopeProvider:
)
FunctionClassDescriptor.Kind.KSuspendFunction -> listOf(
buildResolvedTypeRef {
type = ConeClassLikeLookupTagImpl(StandardClassIds.KFunction)
.constructClassType(arrayOf(typeArguments.last().type), isNullable = false)
},
createSuperType(FunctionClassDescriptor.Kind.SuspendFunction)
)
}
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// IGNORE_LIGHT_ANALYSIS
// WITH_RUNTIME
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
// WITH_REFLECT
// WITH_COROUTINES
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// WITH_COROUTINES
// WITH_REFLECT
// TARGET_BACKEND: JVM
@@ -1,4 +1,3 @@
// IGNORE_BACKEND_FIR: JVM_IR
// WITH_COROUTINES
// WITH_REFLECT
// TARGET_BACKEND: JVM