Cleanup leftovers in compiler and IDE

This commit is contained in:
Ilya Gorbunov
2015-12-29 18:48:56 +03:00
parent 3d5e415c87
commit 92c2d17910
3 changed files with 5 additions and 5 deletions
@@ -79,7 +79,7 @@ class RedundantSamConstructorInspection : AbstractKotlinInspection() {
val samConstructorCalls = samConstructorCallsToBeConverted(expression)
if (samConstructorCalls.isEmpty()) return
if (samConstructorCalls.size() == 1) {
if (samConstructorCalls.size == 1) {
val single = samConstructorCalls.single()
val problemDescriptor = holder.manager.
createProblemDescriptor(single.calleeExpression!!,
@@ -177,7 +177,7 @@ class RedundantSamConstructorInspection : AbstractKotlinInspection() {
// SAM adapters for static functions
for (staticFunWithSameName in containingClass.staticScope.getContributedFunctions(functionResolvedCall.resultingDescriptor.name, NoLookupLocation.FROM_IDE)) {
if (staticFunWithSameName is SamAdapterDescriptor<*>) {
if (isSamAdapterSuitableForCall(staticFunWithSameName, originalFunctionDescriptor, samConstructorCallArguments.size())) {
if (isSamAdapterSuitableForCall(staticFunWithSameName, originalFunctionDescriptor, samConstructorCallArguments.size)) {
return samConstructorCallArguments.check { canBeReplaced(functionCall, it) } ?: emptyList()
}
}
@@ -191,7 +191,7 @@ class RedundantSamConstructorInspection : AbstractKotlinInspection() {
NoLookupLocation.FROM_IDE)
for (syntheticExtension in syntheticExtensions) {
val samAdapter = syntheticExtension as? SamAdapterExtensionFunctionDescriptor ?: continue
if (isSamAdapterSuitableForCall(samAdapter, originalFunctionDescriptor, samConstructorCallArguments.size())) {
if (isSamAdapterSuitableForCall(samAdapter, originalFunctionDescriptor, samConstructorCallArguments.size)) {
return samConstructorCallArguments.check { canBeReplaced(functionCall, it) } ?: emptyList()
}
}