[FIR] Properly implement FirFunctionalTypeKindService

This implementation takes additional functional type kinds from compiler
  plugins into account
This commit is contained in:
Dmitriy Novozhilov
2023-01-18 15:54:22 +02:00
committed by Space Team
parent c86495dcae
commit e0c8f2354a
10 changed files with 115 additions and 6 deletions
@@ -43,6 +43,10 @@ enum class FunctionClassKind(
fun getFunctionalClassKind(className: String, packageFqName: FqName) =
parseClassName(className, packageFqName)?.kind
fun hasArityAtTheEnd(prefix: String, className: String): Boolean {
return toInt(className.substring(prefix.length)) != null
}
private fun toInt(s: String): Int? {
if (s.isEmpty()) return null