Analysis API: adapt to KtCall data model change

Also add API to check if a `KtFunctionSymbol` is the invoke function on
a Kotlin builtin functional type.
This commit is contained in:
Tianyu Geng
2021-11-24 14:18:50 -08:00
committed by Ilya Kirillov
parent 53b3893738
commit c9f9ce99c1
13 changed files with 52 additions and 35 deletions
@@ -0,0 +1,17 @@
/*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.analysis.api.impl.base.util
import org.jetbrains.kotlin.builtins.StandardNames
import org.jetbrains.kotlin.name.CallableId
import org.jetbrains.kotlin.util.OperatorNameConventions
val kotlinFunctionInvokeCallableIds = (0..23).flatMapTo(hashSetOf()) { arity ->
listOf(
CallableId(StandardNames.getFunctionClassId(arity), OperatorNameConventions.INVOKE),
CallableId(StandardNames.getSuspendFunctionClassId(arity), OperatorNameConventions.INVOKE)
)
}