mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] k2: CCE
java.lang.ClassCastException: class org.jetbrains.kotlin.analysis.api.fir.symbols.KtFirSamConstructorSymbol cannot be cast to class org.jetbrains.kotlin.analysis.api.symbols.KtFunctionSymbol at org.jetbrains.kotlin.idea.k2.refactoring.changeSignature.quickFix.ChangeSignatureFixFactoryKt.getDeclarationName(ChangeSignatureFixFactory.kt:401) GitOrigin-RevId: 1823013db4a01096112ad003469ec38880d50061
This commit is contained in:
committed by
intellij-monorepo-bot
parent
bc7c794f6e
commit
10e455d25f
+6
-4
@@ -389,16 +389,18 @@ object ChangeSignatureFixFactory {
|
||||
|
||||
context(KtAnalysisSession)
|
||||
internal fun getDeclarationName(functionLikeSymbol: KtFunctionLikeSymbol): String? {
|
||||
return when {
|
||||
functionLikeSymbol is KtConstructorSymbol -> {
|
||||
return when(functionLikeSymbol) {
|
||||
is KtConstructorSymbol -> {
|
||||
val constructorSymbol = functionLikeSymbol
|
||||
if ((constructorSymbol.getContainingSymbol() as? KtNamedClassOrObjectSymbol)?.isInline == true) {
|
||||
null
|
||||
} else constructorSymbol.containingClassIdIfNonLocal?.shortClassName
|
||||
}
|
||||
|
||||
else -> {
|
||||
(functionLikeSymbol as KtFunctionSymbol).name
|
||||
is KtFunctionSymbol -> {
|
||||
functionLikeSymbol.name
|
||||
}
|
||||
|
||||
else -> null
|
||||
}?.asString()
|
||||
}
|
||||
Reference in New Issue
Block a user