ThisReceiver converted to Kotlin

This commit is contained in:
Mikhail Glukhikh
2015-11-17 11:46:25 +03:00
parent ffb67eb79e
commit 7ba297db81
13 changed files with 20 additions and 23 deletions
@@ -91,7 +91,7 @@ public fun Call.mapArgumentsToParameters(targetDescriptor: CallableDescriptor):
public fun ThisReceiver.asExpression(resolutionScope: LexicalScope, psiFactory: KtPsiFactory): KtExpression? {
val expressionFactory = resolutionScope.getImplicitReceiversWithInstanceToExpression()
.entrySet()
.firstOrNull { it.key.getContainingDeclaration() == this.getDeclarationDescriptor() }
.firstOrNull { it.key.getContainingDeclaration() == this.declarationDescriptor }
?.value ?: return null
return expressionFactory.createExpression(psiFactory)
}