Skip to content

Commit e218afd

Browse files
committed
Remove redundant isClassExtensionFor method
1 parent f2303c7 commit e218afd

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

server/src/main/kotlin/org/javacs/kt/completion/Completions.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -435,11 +435,6 @@ private fun isExtensionFor(type: KotlinType, extensionFunction: CallableDescript
435435
|| (TypeUtils.getTypeParameterDescriptorOrNull(receiverType)?.isGenericExtensionFor(type) ?: false)
436436
}
437437

438-
private fun ClassDescriptor.isClassExtensionFor(type: KotlinType): Boolean {
439-
fun equalsReceiver(type: KotlinType) = TypeUtils.getClassDescriptor(type)?.fqNameSafe == fqNameSafe
440-
return equalsReceiver(type) || type.supertypes().any(::equalsReceiver)
441-
}
442-
443438
private fun TypeParameterDescriptor.isGenericExtensionFor(type: KotlinType): Boolean =
444439
upperBounds.all { KotlinTypeChecker.DEFAULT.isSubtypeOf(type, it) }
445440

0 commit comments

Comments
 (0)