[JS IR BE] Implement type check for SuspendFunctionN

This commit is contained in:
Roman Artemev
2019-05-16 16:43:44 +03:00
committed by romanart
parent 9894c216c1
commit 9c7d47789c
8 changed files with 36 additions and 5 deletions
@@ -54,6 +54,7 @@ fun IrType.typeParameterSuperTypes(): List<IrType> {
}
fun IrType.isFunctionTypeOrSubtype(): Boolean = DFS.ifAny(listOf(this), { it.superTypes() }, { it.isFunction() })
fun IrType.isSuspendFunctionTypeOrSubtype(): Boolean = DFS.ifAny(listOf(this), { it.superTypes() }, { it.isSuspendFunction() })
fun IrType.isTypeParameter() = classifierOrNull is IrTypeParameterSymbol