Fix shortening references for return type in MakeTypeExplicitInLambdaIntention

#KT-5475 Fixed
This commit is contained in:
Pavel V. Talanov
2014-07-15 18:05:58 +04:00
parent 5246735648
commit e390385bf9
4 changed files with 18 additions and 1 deletions
@@ -88,9 +88,9 @@ public class MakeTypeExplicitInLambdaIntention : JetSelfTargetingIntention<JetFu
val paramList = functionLiteral.getValueParameterList()
val returnTypeColon = psiFactory.createColon()
val returnTypeExpr = psiFactory.createType(DescriptorRenderer.SOURCE_CODE.renderType(expectedReturnType))
ShortenReferences.process(returnTypeExpr)
functionLiteral.addAfter(returnTypeExpr, paramList)
functionLiteral.addAfter(returnTypeColon, paramList)
ShortenReferences.process(functionLiteral.getReturnTypeRef()!!)
}
// Step 3: make the receiver type explicit