Fix EA-125880
This commit is contained in:
@@ -49,7 +49,7 @@ class ChangeFunctionLiteralReturnTypeFix(
|
|||||||
|
|
||||||
private fun createAppropriateQuickFix(functionLiteralExpression: KtLambdaExpression, type: KotlinType): IntentionAction? {
|
private fun createAppropriateQuickFix(functionLiteralExpression: KtLambdaExpression, type: KotlinType): IntentionAction? {
|
||||||
val context = functionLiteralExpression.analyze()
|
val context = functionLiteralExpression.analyze()
|
||||||
val functionLiteralType = context.getType(functionLiteralExpression) ?: error("Type of function literal not available in binding context")
|
val functionLiteralType = context.getType(functionLiteralExpression) ?: return null
|
||||||
|
|
||||||
val builtIns = functionLiteralType.constructor.builtIns
|
val builtIns = functionLiteralType.constructor.builtIns
|
||||||
val functionClass = builtIns.getFunction(functionLiteralType.arguments.size - 1)
|
val functionClass = builtIns.getFunction(functionLiteralType.arguments.size - 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user